Loads the class's state. Args: state_dict (dict): scaler state. Should be an object returned from a call to :meth:`state_dict`.
(self, state_dict)
| 135 | return dict(self.__dict__.items()) |
| 136 | |
| 137 | def load_state_dict(self, state_dict): |
| 138 | """Loads the class's state. |
| 139 | Args: |
| 140 | state_dict (dict): scaler state. Should be an object returned |
| 141 | from a call to :meth:`state_dict`. |
| 142 | """ |
| 143 | self.__dict__.update(state_dict) |
| 144 | |
| 145 | def get_value(self): |
| 146 | """Gets the current EMA decay rate.""" |