Error现场
解决方法
将如下代码
import tensorflow as tf x tf.placeholder(tf.float32, shape [None, w, h, c], name x ) y_ tf.placeholder(tf.int32, shape [None, ], name y_ )
改为如下
import tensorflow as tf tf.compat.v1.disable_eager_execution() x tf.compat.v1.placeholder(tf.float32, shape [None, w, h, c], name x ) y_ tf.compat.v1.placeholder(tf.int32, shape [None, ], name y_ )



