convert_to
Function Usage
Converts the value of a tensor to a specified type. The dtype.float32, dtype.float16, dtype.int8, dtype.int32, dtype.uint8, dtype.int16, dtype.uint16, dtype.uint32, dtype.int64, dtype.uint64, dtype.double, and dtype.bool types are supported.
It is supported by the Atlas inference product and
- The input and output tensors must be on the device.
Prototype
convert_to(inputTensor: Tensor, dataType: dtype)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
inputTensor |
Input |
Tensor class, input tensor. |
dataType |
Input |
dtype class, which specifies the type to be converted. |
Response Parameters
Converted tensor data
Parent topic: TensorOperations