JitScalarType¶
- class torch.onnx.JitScalarType(value)¶
Scalar types defined in torch.
Use
JitScalarType
to convert from torch and JIT scalar types to ONNX scalar types.- Examples::
>>> JitScalarType.from_name("Float").onnx_type() TensorProtoDataType.FLOAT
- classmethod from_name(name)[source]¶
Convert a JIT scalar type or torch type name to ScalarType.
- Parameters:
name – JIT scalar type name (Byte) or torch type name (uint8_t).
- Returns:
ScalarType.
- Raises:
ValueError – if name is not a valid scalar type name or if it is None.