简体   繁体   English

如何修复 AttributeError:模块“tensorflow”没有属性“ConfigProto”

[英]How can I fix AttributeError: module 'tensorflow' has no attribute 'ConfigProto'

I am new to deep learning and I get the following error when I try to run the command for image style transfer given in a tutorial I am using to learn.我是深度学习的新手,当我尝试运行我用来学习的教程中给出的图像样式转移命令时出现以下错误。

python evaluate.py --checkpoint ./rain-princess.ckpt --in-path <path_to_input_file> --out-path ./output_image.jpg

I have scipy 1.1.0 installed.我安装了 scipy 1.1.0。 (downgraded to fix the issues AttributeError: module 'tensorflow' has no attribute 'imread') . (降级以修复问题 AttributeError: module 'tensorflow' has no attribute 'imread')

I have Tensorflow installed.我安装了 Tensorflow。 I have pillow installed.我已经安装了枕头。

Please note that I do not have the knowledge to edit any file, I am just copying the commands to see how it executes.请注意,我没有编辑任何文件的知识,我只是复制命令以查看它是如何执行的。

A screenshot of the error message错误消息的屏幕截图

This could be because you are using tensorflow 2.0 (when installing tensorflow by default it installs 2.0 now).这可能是因为您使用的是 tensorflow 2.0(在默认情况下安装 tensorflow 时,它现在安装 2.0)。 Seems like your evaluvate.py file is suited to execute with tensorflow 1.* as it searches for configproto that is absent in 2.0 So downgrade tensorflow by似乎您的 evaluvate.py 文件适合使用 tensorflow 1.* 执行,因为它搜索 2.0 中不存在的 configproto 所以将 tensorflow 降级为

pip install tensorflow==1.14

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AttributeError: 模块“tensorflow”没有属性“ConfigProto” - AttributeError: module 'tensorflow' has no attribute 'ConfigProto' 我该如何解决这个问题:AttributeError:模块'tensorflow_core.python.keras.api._v2.keras'没有属性'Dense' - how can i fix this : AttributeError: module 'tensorflow_core.python.keras.api._v2.keras' has no attribute 'Dense' 修复“AttributeError:模块'tensorflow'没有属性'get_default_graph'” - Fix “AttributeError: module 'tensorflow' has no attribute 'get_default_graph'” 如何修复“AttributeError:模块‘tensorflow’没有属性‘get_default_graph’”? - How to fix "AttributeError: module 'tensorflow' has no attribute 'get_default_graph'"? 如何解决这个 AttributeError: module &#39;tensorflow&#39; has no attribute &#39;get_default_graph&#39;? - How to fix this AttributeError: module 'tensorflow' has no attribute 'get_default_graph'? 如何修复:AttributeError:模块“tensorflow”在 JupyterNotebook 中没有属性“优化器”(使用 colab.research) - How to fix: AttributeError: module 'tensorflow' has no attribute 'optimizers' in JupyterNotebook (using colab.research) 如何修复 AttributeError:模块“tensorflow”没有属性“reset_default_graph” - How to fix AttributeError: module 'tensorflow' has no attribute 'reset_default_graph' AttributeError: &#39;int&#39; 对象没有属性 &#39;get&#39; 我该如何修复它 - AttributeError: 'int' object has no attribute 'get' how can i fix it AttributeError: 'function' object 没有属性 'read' — 我该如何修复? - AttributeError: 'function' object has no attribute 'read' — HOW CAN I FIX? AttributeError: 'function' object 没有属性 'split'。 我该如何解决? - AttributeError: 'function' object has no attribute 'split'. How I can fix it?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM