In inception/inception_eval.py möchte ich das Etikett und logits drucken.So drucken Sie die Zahl der Tensor in Tensorflow
Ich habe einige Methoden versucht, aber sie funktionieren nicht.
Wie bekomme ich die Anzahl dieser Tensoren?
with tf.Graph().as_default():
# Get images and labels from the dataset.
# with tf.Session() as sess:
# images, labels = image_processing.inputs(dataset)
# print ("lable")
# sess.run (labels.eval())
images, labels = image_processing.inputs(dataset)
# sess = tf.Session()
# print("lable")
# print (labels)
# Number of classes in the Dataset label set plus 1.
# Label 0 is reserved for an (unused) background class.
num_classes = dataset.num_classes() + 1
# Build a Graph that computes the logits predictions from the
# inference model.
logits, _ = inception.inference(images, num_classes)
print ("logits")
# print (tf.cast(logits,tf.float32).eval())
# print ("_")
# print (tf.cast(_,tf.float32).eval())
Diese Frage habe ich gelöst. https://github.com/Youngkl0726/Inception/blob/master/inception/inception_eval.py Dies ist die Lösung. – youngkl