ExTorch.DType
(extorch v0.3.0)
Copy Markdown
A torch.dtype is an object that represents the data type of a torch.Tensor.
ExTorch has twelve different data types:
Summary
Types
Alias names to other integral/floating tensor types.
Basic tensor types
Complex number tensor types.
A torch.dtype is an object that represents the data type of a torch.Tensor.
Floating point tensor types.
Integral tensor types, unsigned and signed.
Numeric tensor types
Quantized floating point tensor types.
Types
@type alias_type() ::
:byte
| :char
| :short
| :int
| :long
| :half
| :float
| :double
| :chalf
| :cfloat
| :cdouble
| :complex_float
| :complex_double
Alias names to other integral/floating tensor types.
@type base_type() :: :bool | numeric_type() | complex_type()
Basic tensor types
@type complex_type() :: :complex32 | :complex64 | :complex128
Complex number tensor types.
@type dtype() :: base_type() | complex_type() | quantized_type() | alias_type() | nil
A torch.dtype is an object that represents the data type of a torch.Tensor.
@type floating_type() :: :float16 | :bfloat16 | :float32 | :float64
Floating point tensor types.
@type integral_type() :: :uint8 | :int8 | :int16 | :int32 | :int64
Integral tensor types, unsigned and signed.
@type numeric_type() :: integral_type() | floating_type()
Numeric tensor types
@type quantized_type() :: :quint8 | :quint2x4 | :quint4x2 | :qint8 | :qint32
Quantized floating point tensor types.