Internal error when using TensorFlow: An internal method or attribute does not exist

When I saw the error reported by TensorFlow's internal encapsulation method, my first reaction was that the versions did not match. I immediately searched for the corresponding version and installed it repeatedly according to the TensorFlow 2.2.0+keras 2.3.1 +python 3.7 given on the Internet. After uninstalling, upgrading, and downgrading the version many times, the result was still eight lines. Just when I was about to explode, I tried the following command:

# 清除Python缓存
python -m compileall .

Then run the program again and the problem is solved successfully! ! !
I'll record it here, hoping it can help anyone who has the same problem.

Guess you like

Origin blog.csdn.net/David_house/article/details/132069296