[英]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.请注意,我没有编辑任何文件的知识,我只是复制命令以查看它是如何执行的。
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.