credit.mixed_precision#
Functions#
|
Parses a string representation of a torch dtype and returns the corresponding torch.dtype object. |
Module Contents#
- credit.mixed_precision.parse_dtype(dtype_str: str) torch.dtype#
Parses a string representation of a torch dtype and returns the corresponding torch.dtype object.
- Parameters:
dtype_str (str) – The string representation of the dtype (e.g., “float32”, “int64”).
- Returns:
The corresponding torch.dtype object.
- Return type:
torch.dtype