【发布时间】:2017-12-26 21:40:25
【问题描述】:
不知道有没有办法以张量列表的数据类型打印输入队列。
import tensorflow as tf
image=tf.cast(image,tf.string)#list of input image directory
label=tf.cast(label,tf.int32) #list of input image label
input_queue=tf.train.slice_input_producer([image,label])
with tf.Session() as session:
print(session.run(input_queue))
如果print input_queue这样,程序继续运行,不会有任何响应。
【问题讨论】:
-
您能否为张量
image和label添加一些示例条目?这样我就可以研究解决方案。只需几个条目就可以了。 -
另外,看到这个答案会有所帮助:stackoverflow.com/questions/43567552/…
-
你可以参考这个 [script](github.com/kevin28520/My-TensorFlow-tutorials/blob/master/…) 我刚刚从第 97 行引用。谢谢 :) @kmario23
-
如果您在使用
tf.read_file()阅读后尝试打印它,那么我猜它会起作用。因为这些图像必须从您的目录中读取。
标签: python tensorflow neural-network deep-learning conv-neural-network