Skip to content

Commit

Permalink
Remove overwrite
Browse files Browse the repository at this point in the history
Signed-off-by: SeanNaren <snarenthiran@nvidia.com>
  • Loading branch information
SeanNaren committed Nov 30, 2022
1 parent 167fecd commit 1a508a3
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions nemo/collections/common/callbacks/ema.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,6 @@ def __init__(
every_n_steps: int = 1,
current_step: int = 0,
):

# copy most of the `Optimizer` methods into this instance. `__del__` is skipped in case the optimizer has
# implemented custom logic which we would not want to call on destruction of the `EMAOptimizer`.
# this allows us to use the underlying optimizer without having to go through the EMAOptimizer wrapper.
self.__dict__ = {k: v for k, v in optimizer.__dict__.items() if k not in ("step", "__del__")}

self.optimizer = optimizer
self.decay = decay
self.device = device
Expand Down

0 comments on commit 1a508a3

Please sign in to comment.