AttributeError: module ‘tensorflow‘ has no attribute ‘reset_default_graph‘

Error message:

An error occurs when using tensorflow:
AttributeError: module 'tensorflow' has no attribute 'reset_default_graph'

Solution:

Python version must be less than 3.7
tensorflow version must be less than 2.0

Useconda create -n [环境名称] python=3.8(python的版本) to create the virtual environment tensorflow in the conda environment, the python version is 3.6:

conda create -n tensorflow python=3.6

Install tensorflow library:

conda install tensorflow=1.11.0

Guess you like

Origin blog.csdn.net/qq_52671517/article/details/132247408