张量(“args_0:0", shape=(28, 28, 1), dtype=float32) [英] Tensor("args_0:0", shape=(28, 28, 1), dtype=float32)
问题描述
为了学习目的,我试图在 Google Colab 中执行以下代码.我在执行以下代码时收到此消息.
I was trying to execute the code below in Google Colab for learning purposes.I got this message when i executed the following code.
张量("args_0:0", shape=(28, 28, 1), dtype=float32)
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?
推荐答案
这个输出意味着你的图像是一个形状为 (28,28,1)
和类型 float32
的张量code> (28,28,1)
中的 1 是 gray-scale
的单个字节,这意味着您有灰度图像(基于您的代码)
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)
这篇关于张量(“args_0:0", shape=(28, 28, 1), dtype=float32)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!