public class
CastOp
Casts a TensorBuffer
to a specified data type.
Public Constructors
Public Methods
TensorBuffer |
apply(TensorBuffer input)
|
Inherited Methods
Public Constructors
public CastOp (DataType destinationType)
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.
Parameters
destinationType | The type of the casted TensorBuffer . |
---|
Throws
IllegalArgumentException | if destinationType is neither DataType.UINT8
nor DataType.FLOAT32 .
|
---|