ValueError: Variable conv1/weights1 already exists, disallowed. Did you mean to set reuse=True in VarScope? Originally defined at:

在使用tensorflow 中的tf.variable_scope和tf.get_variable搭建网络时,重复运行程序会报以上的ValueError错误,这是因为第二次运行时,内存中已经存在名字相同的层或者参数,发生了冲突,所以会提示是否要reuse。

解决方案:

(1)如果你用的是spyder编译的程序,重新启动一下python console就好了

(2)终端运行程序则不会出现上述问题

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-09
  • 2022-01-23
  • 2022-02-08
  • 2022-12-23
  • 2021-11-08
  • 2021-12-14
猜你喜欢
  • 2021-05-16
  • 2022-01-25
  • 2021-12-20
  • 2022-12-23
  • 2022-12-23
  • 2021-09-02
相关资源
相似解决方案