module 'tensorflow' has no attribute 'Session\reset_default_graph()'等问题,都是TensorFlow版本问题:tensorflow 1中很多函数tensorflow 2 都不能用。
针对上面问题,不想降版,可以在原有的import tensorflow as tf下输入:
import tensorflow.compat.v1 as tf #报错,但是并不影响运行
tf.disable_v2_behavior()
虽然,compat会报错,但是不影响运行