问题
I was trying to execute the code below in Google Colab for learning purposes.I got this message when i executed the following code.
Tensor("args_0:0", shape=(28, 28, 1), dtype=float32)
def normalize(images, labels):
print(images)
images = tf.cast(images, tf.float32)
print(images)
images /= 255
print(images)
return images, labels
I am trying to understand what this message means but I am not able ti understand it. Tried searching in web , but couldn't find much resources. Can anyone say what this statements mean?
回答1:
This output means that your images are a tensor of shape (28,28,1)
and type float32
the 1 in (28,28,1)
is a single byte for gray-scale
meaning you have gray-scale images (basing on your code)
来源:https://stackoverflow.com/questions/58391052/tensorargs-00-shape-28-28-1-dtype-float32