tf.to_int32(
x,
name='ToInt32'
)
Convert to an int32 tensor.
parameter:
- x: sparse tensor or tensor.
- name: name of the operation (optional).
return value:
- X same shape as a tensor or sparse tensor of type int32.
abnormal:
TypeError
: Ifx
cannot be cast to theint32
.
Original link: https://tensorflow.google.cn/versions/r1.9/api_docs/python/tf/to_int32?hl=en