我在控制台(而不是Jupyter笔记本)中运行TensorFlow代码,尽管我使用tf.Print
,但它不会打印任何内容。用法如下:
#This is during Graph construction
elem = train_get_list[i]
img = elem[0]
label = elem[1]
img = tf.Print(img, [tf.shape(img)], "The shape of input is :")
elemshape.append(img)
net, networksummaries = overfeataccurate(img,numclasses=1000, phase=phasecond)
会议期间的后期:
[val_accu, summaries,_] = sess.run([running_accuracy, validation_summary_op, img])
以上内容不会打印任何内容,以下内容也不会打印任何内容:
[val_accu, summaries,_] = sess.run([running_accuracy, validation_summary_op,elemshape])
我做错了什么?