modelzoo.common.pytorch.run_cstorch_flow.GradScalerParams#
- class modelzoo.common.pytorch.run_cstorch_flow.GradScalerParams[source]#
Bases:
object
Dataclass for parsing grad scaler params from optimizer params.
Methods
Returns an instance of GradScalerParams from a dictionary.
Attributes
initial_loss_scale
loss_scaling_factor
max_gradient_norm
max_gradient_value
max_loss_scale
min_loss_scale
steps_per_increase
- __init__(loss_scaling_factor: Optional[Union[float, str]] = 1.0, initial_loss_scale: Optional[float] = None, steps_per_increase: Optional[int] = 2000, min_loss_scale: Optional[float] = None, max_loss_scale: Optional[float] = None, max_gradient_norm: Optional[float] = None, max_gradient_value: Optional[float] = None) None #