code: def __init__(
      self, init_scale=2.0**15, scale_factor=2.0, scale_window=100
  ):
      self.cur_scale = init_scale
      self.cur_iter = 0
      self.last_overflow_iter = -1
      self.scale_factor = scale_factor
      self.scale_window = scale_window
  
imports: import torch
  import torch.nn
  from torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors
label_desc: Use image node_id 1 to create a new DynamicLossScaler object  with example: obj = DynamicLossScaler(init_scale, scale_factor, scale_window)