I want to upload an npy file to tensor. So I used tf.decode_raw()
after tf.read_file()
, but the value and size are different from the original npy file. Can't improve this? ( I know it works with tf.convert_to_tensor()
, but I think I should use read_file()
to do tf.train.slice_input_producer()
for running deep learning. )
file_reader = tf.read_file('./data/test_LR/T2_npy/T2_168_C6M5_1.npy')
ab = tf.decode_raw(file_reader, out_type = tf.uint8)
sess = tf.Session()
a = sess.run(ab)
print(np.shape(a))
# result
(49280,)
an = np.load('./data/test_LR/T2_npy/T2_168_C6M5_1.npy')
print(np.shape(an))
# result
(192,256) -> 49152