【问题标题】:How can I fix AttributeError: module 'tensorflow' has no attribute 'ConfigProto'如何修复 AttributeError:模块 'tensorflow' 没有属性 'ConfigProto'
【发布时间】:2019-11-06 09:00:28
【问题描述】:

我是深度学习的新手,当我尝试运行我用来学习的教程中给出的图像样式转换命令时出现以下错误。

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

我已经安装了 scipy 1.1.0。 (降级以修复 AttributeError: module 'tensorflow' has no attribute 'imread').

我已经安装了 Tensorflow。我已经安装了枕头。

请注意,我不具备编辑任何文件的知识,我只是复制命令以查看其执行方式。

A screenshot of the error message

【问题讨论】:

标签: python tensorflow deep-learning style-transfer


【解决方案1】:

这可能是因为您使用的是 tensorflow 2.0(默认安装 tensorflow 时,它现在安装的是 2.0)。似乎您的 evaluvate.py 文件适合使用 tensorflow 1.* 执行,因为它搜索 2.0 中不存在的 configproto 所以通过

降级 tensorflow
pip install tensorflow==1.14

【讨论】:

  • 非常感谢兄弟,你已经把我从脑力衰竭的问题中解救了好几天了。你是最棒的!
猜你喜欢
  • 2019-10-01
  • 2019-05-25
  • 2019-08-25
  • 2020-09-03
  • 2020-03-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多