1、
"AttributeError: module 'tensorflow' has no attribute 'random_normal'"问题解决办法
使用
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
替换
import tensorflow as tf
2、tensorflow.python.framework.errors_impl.InvalidArgumentError: Input to reshape is a tensor with 196608 values, but the requested shape has 786432 [Op:Reshape]
3、AttributeError: module 'tensorflow' has no attribute 'Session'
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
替换
import tensorflow as tf
标签:attribute,module,shape,报错,import,tensorflow,合集 From: https://www.cnblogs.com/dq0618/p/17609532.html