版本 bug

1.代碼 https://github.com/jacobgil/keras-dcgan/blob/master/dcgan.py

def generator_containing_discriminator(g, d):
    model = Sequential()
    model.add(g)
    d.trainable = False
    model.add(d)
    return model

問題:ValueError: Variable batch_normalization_1/moving_mean/biased already exists, disallowed. Did you mean to set reuse=True in VarScope? Originally defined at:

解決方法:https://github.com/keras-team/keras/issues/9235

Which version of tensorflow are you using? We have noticed a problem with version 1.3 with keras 2.1.3. If you are using version 1.3, can you upgrade the tensorflow version and try running the model again?

升級:pip install  --upgrade tensorflow==1.4 後解決

tip!!!! 該github代碼建議在tensorflow 1.5  keras 2.1.4環境下運行  親測1.4和2.1。3搭配報錯

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章