简体   繁体   中英

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. (downgraded to fix the issues AttributeError: module 'tensorflow' has no attribute 'imread') .

I have Tensorflow installed. 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). 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

pip install tensorflow==1.14

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM