oneflow.Tensor.int¶
-
Tensor.
int
()¶ Tensor.int() is equivalent to Tensor.to(flow.int32). See to().
- Parameters
input (Tensor) – the input tensor.
For example:
>>> import oneflow as flow >>> import numpy as np >>> input = flow.tensor(np.random.randn(1, 2, 3), dtype=flow.float32) >>> input = input.int() >>> input.dtype oneflow.int32