caicloud / tensorflow-tutorial

Example TensorFlow codes and Caicloud TensorFlow as a Service dev environment.
2.93k stars 2.08k forks source link

第九章2.改造后的mnist_trian.ipnb运行出现ValueError #73

Closed ring0o0o closed 7 years ago

ring0o0o commented 7 years ago

ValueError: Variable layer1/weights already exists, disallowed. Did you mean to set reuse=True in VarScope? Originally defined at:... 不知道应该怎么修改?是应该在inference中添加reuse么?

ring0o0o commented 7 years ago

在stackoverflow上找到了解决办法,在jupyter上运行的话,要在定义变量前添加 tf.reset_default_graph()来清除之前的变量定义。