tf.to_int32

tf.to_int32(
    x,
    name='ToInt32'
)

将张量转换为int32类型。

参数:

  • x:  张量或稀疏张量。
  • name:  操作的名称(可选)。 

返回值:

  • 一种形状与x相同的张量或稀疏张量,类型为int32。

异常:

  • TypeError: If x cannot be cast to the int32.

原链接:  https://tensorflow.google.cn/versions/r1.9/api_docs/python/tf/to_int32?hl=en

猜你喜欢

转载自blog.csdn.net/weixin_36670529/article/details/91818563
tf