code: def __init__(
      self,
      enable=True,
      init_loss_scaling=2.0**15,
      incr_ratio=2.0,
      decr_ratio=0.5,
      incr_every_n_steps=1000,
      decr_every_n_nan_or_inf=2,
      use_dynamic_loss_scaling=True,
      max_loss_scaling=32768.0,
  ):
      super(LSCGradScaler, self).__init__(
          enable,
          init_loss_scaling,
          incr_ratio,
          decr_ratio,
          incr_every_n_steps,
          decr_every_n_nan_or_inf,
          use_dynamic_loss_scaling,
      )
      self.max_loss_scaling = max_loss_scaling
  
file_path: insightface/recognition/arcface_paddle/dynamic/utils/amp.py
imports: from collections import defaultdict
  from paddle.amp import GradScaler
  from paddle import _C_ops
  import paddle
label_desc: Use image node_id 1 to create a new LSCGradScaler object from inherited base classes: GradScaler with example: obj = LSCGradScaler(enable, init_loss_scaling, incr_ratio, decr_ratio, incr_every_n_steps, decr_every_n_nan_or_inf, use_dynamic_loss_scaling, max_loss_scaling)