Casts a TensorBuffer to a specified data type.
| TensorBuffer |
apply(TensorBuffer input)
|
Constructs a CastOp.
Note: For only converting type for a certain TensorBuffer on-the-fly rather than in
a processor, please directly use TensorBuffer.createFrom(TensorBuffer, DataType).
When this Op is executed, if the original TensorBuffer is already in destinationType, the original buffer will be directly returned.
| destinationType | The type of the casted TensorBuffer. |
|---|
| IllegalArgumentException | if destinationType is neither DataType.UINT8
nor DataType.FLOAT32.
|
|---|