Design
Models
API
API Mapping
Migration Guide
Syntax Support
FAQ
RELEASE NOTES
Converts input tensor dtype to float16.
Tensor, converted to the float16 dtype.
Ascend GPU CPU
Ascend
GPU
CPU
Examples
>>> input_x = Tensor(np.ones([2,2]), mindspore.int32) >>> output = input_x.half() >>> print(output.dtype) Float16