Tensorflow 錯誤ValueError

Tensorflow 錯誤ValueError: Variable already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope? Originally defined at:

錯誤截圖

在這裏插入圖片描述

解決方案

在with tf.Session(config=tf_config) as sess: 語句之前增加 tf.reset_default_graph()

參考資料

1: https://github.com/kratzert/finetune_alexnet_with_tensorflow/issues/8
2: https://www.jianshu.com/p/fc11f32800f9
3: https://blog.csdn.net/Jerr__y/article/details/70809528

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