From adba66c3a64a98e29914668a14cabfbb2ed1b919 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 14 Mar 2020 18:08:48 -0700 Subject: [PATCH] EMA class updates --- utils/torch_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/torch_utils.py b/utils/torch_utils.py index 98e80345..36ab9ead 100644 --- a/utils/torch_utils.py +++ b/utils/torch_utils.py @@ -151,4 +151,4 @@ class ModelEMA: # Assign attributes (which may change during training) for k in model.__dict__.keys(): if not k.startswith('_'): - self.ema.__setattr__(k, model.getattr(k)) + setattr(model, k, getattr(model, k))