我试图通过以下方式读取TensorFlow中的BMP文件:
reader = tf.TextLineReader()
_, value = reader.read(filename_queue)
filename, label = tf.decode_csv(value, [[''], [0]])
im = tf.decode_raw(tf.read_file(filename), tf.uint8)
错误如下:
E tensorflow/core/client/tensor_c_api.cc:485] Input to reshape is a tensor with 44200 values, but the requested shape has 750000
[[Node: batch_processing/Reshape = Reshape[T=DT_UINT8, _device="/job:localhost/replica:0/task:0/cpu:0"](batch_processing/Slice, batch_processing/Reshape/shape)]]
E tensorflow/core/client/tensor_c_api.cc:485] Input to reshape is a tensor with 33871 values, but the requested shape has 750000
[[Node: batch_processing/Reshape = Reshape[T=DT_UINT8, _device="/job:localhost/replica:0/task:0/cpu:0"](batch_processing/Slice, batch_processing/Reshape/shape)]]
E tensorflow/core/client/tensor_c_api.cc:485] Input to reshape is a tensor with 47566 values, but the requested shape has 750000
[[Node: batch_processing/Reshape = Reshape[T=DT_UINT8, _device="/job:localhost/replica:0/task:0/cpu:0"](batch_processing/Slice, batch_processing/Reshape/shape)]]
为什么 tf.decode 的输出会发生变化?我该如何解决这个问题呢?
任何帮助都将不胜感激。