tensorFlow中的 TypeError

在我的代码中如下:
batch_xs, batch_ys = read_and_decode(tfrecords_file, batch_size = BATCH_SIZE)
session.run(optimizer, feed_dict = {xs: batch_xs, ys: batch_ys})

read_and_decode的输出batch_xs 和 batch_ys 都是[BATCH_SIZE, 35, 35] 的Tensor,
类型是Uint8;而 xs, ys都是 tf.placeholder(tf.float32, [BATCH_SIZE, 35, 35, 1])

报错是:TypeError:'The value of a feed cannot be a tf.Tensor object. '

本人TensorFlow入门菜鸟一只,求问大神们这里该如何改?

我之前也遇到这个问题,是池化后的数据不足以匹配训练需要的数据,但代码是没问题的~最后我的问题是TensorFlow的版本问题,我写的代码是2.0版本的,系统默认了使用3的,就有了这个问题的出现。你可以查看一下python版本和TensorFlow是否匹配,有可能是这个问题

输入文件tfrecords__file里面存储的是什么信息,是不是不可以通过占位符读取出来?