tf.to_int32(
x,
name='ToInt32'
)
将张量转换为int32类型。
参数:
- x: 张量或稀疏张量。
- name: 操作的名称(可选)。
返回值:
- 一种形状与x相同的张量或稀疏张量,类型为int32。
异常:
TypeError
: Ifx
cannot be cast to theint32
.
原链接: https://tensorflow.google.cn/versions/r1.9/api_docs/python/tf/to_int32?hl=en