def state_dict(self):
        """Returns the state of the scaler as a :class:`dict`."""
        return dict(
            cur_scale=self.cur_scale,
            cur_iter=self.cur_iter,
            mode=self.mode,
            last_overflow_iter=self.last_overflow_iter,
            scale_factor=self.scale_factor,
            scale_window=self.scale_window)
Returns the state of the scaler as a :class:`dict`.
ControlNet-v1-1-nightly/annotator/uniformer/mmcv/runner/fp16_utils.py