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_value(torch.ones(1, 2)).onnx_type()
   TensorProtoDataType.FLOAT
JitScalarType.from_value(torch_c_value_with_type_float).onnx_type()
   TensorProtoDataType.FLOAT
JitScalarType.from_dtype(torch.get_default_dtype).onnx_type()
   TensorProtoDataType.FLOAT



dtype()
  Convert a JitScalarType to a torch dtype.

  Return type:
     *dtype*

classmethod from_dtype(dtype)
  Convert a torch dtype to JitScalarType.

  Note: DO NOT USE this API when *dtype* comes from a
  *torch._C.Value.type()* calls.
     A "RuntimeError: INTERNAL ASSERT FAILED at
     "../aten/src/ATen/core/jit_type_base.h" can be raised in
     several scenarios where shape info is not present. Instead
     use *from_value* API which is safer.
