AttributeError:module tensorflow no attribute app,以及module 'tensorflow' has no attribute 'flags'等等

這是因爲tensorflow版本的原因,我的tensorflow的版本是2.0.0的,而源代碼是tensorflow1.幾版本的,所以只需要將源文件裏面的 import tensorflow ad tf 改爲 import tensorflow.compat.v1 as tf 具體方法:編輯你的文件 最後成功
相關文章
相關標籤/搜索