Types Models¶
aana.core.models.types
¶
Dtype
¶
Bases: str
, Enum
Data types.
Possible values are "auto", "float32", "float16", "bfloat16" and "int8".
ATTRIBUTE | DESCRIPTION |
---|---|
AUTO |
auto
TYPE:
|
FLOAT32 |
float32
TYPE:
|
FLOAT16 |
float16
TYPE:
|
BFLOAT16 |
bfloat16
TYPE:
|
INT8 |
int8
TYPE:
|
to_torch
¶
Convert the instance's dtype to a torch dtype.
RETURNS | DESCRIPTION |
---|---|
dtype | str
|
Union[torch.dtype, str]: the torch dtype or "auto" |
RAISES | DESCRIPTION |
---|---|
ValueError
|
if the dtype is unknown |