Tensor(“args_0:0”, shape=(28, 28, 1), dtype=float32)

我是研究僧i 提交于 2021-01-29 13:20:15

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!