ema-pytorch 0.3.2__py3-none-any.whl → 0.3.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ema-pytorch might be problematic. Click here for more details.

@@ -69,6 +69,8 @@ class EMA(Module):
69
69
  self._beta = beta
70
70
  self.karras_beta = karras_beta
71
71
 
72
+ self.is_frozen = beta == 1.
73
+
72
74
  # whether to include the online model within the module tree, so that state_dict also saves it
73
75
 
74
76
  self.include_online_model = include_online_model
@@ -202,6 +204,9 @@ class EMA(Module):
202
204
 
203
205
  @torch.no_grad()
204
206
  def update_moving_average(self, ma_model, current_model):
207
+ if self.is_frozen:
208
+ return
209
+
205
210
  copy, lerp = self.inplace_copy, self.inplace_lerp
206
211
  current_decay = self.get_current_decay()
207
212
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ema-pytorch
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: Easy way to keep track of exponential moving average version of your pytorch module
5
5
  Home-page: https://github.com/lucidrains/ema-pytorch
6
6
  Author: Phil Wang
@@ -0,0 +1,7 @@
1
+ ema_pytorch/__init__.py,sha256=jCgUV6FfA65ct6lMEClKKwl-gjZMDv7aOeaN3RshE0U,40
2
+ ema_pytorch/ema_pytorch.py,sha256=eOycxsyO3aCBzToiBGEqOJIGxklX3N3Yitq3wldwHkg,8573
3
+ ema_pytorch-0.3.3.dist-info/LICENSE,sha256=xZDkKtpHE2TPCAeqKe1fjdpKernl1YW-d01j_1ltkAU,1066
4
+ ema_pytorch-0.3.3.dist-info/METADATA,sha256=i2-cAyNXNi4l-xUVsrvFP5wpJHvzyglB1BBBFhobwqg,715
5
+ ema_pytorch-0.3.3.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
6
+ ema_pytorch-0.3.3.dist-info/top_level.txt,sha256=XXFJmHviark_32Hfm5X9niezVmnRTUIhfdifCrJgXmE,12
7
+ ema_pytorch-0.3.3.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- ema_pytorch/__init__.py,sha256=jCgUV6FfA65ct6lMEClKKwl-gjZMDv7aOeaN3RshE0U,40
2
- ema_pytorch/ema_pytorch.py,sha256=WBOhcK_7WWBy48tYcsIJceaZvF4oz8qjOueQX1LoLqI,8489
3
- ema_pytorch-0.3.2.dist-info/LICENSE,sha256=xZDkKtpHE2TPCAeqKe1fjdpKernl1YW-d01j_1ltkAU,1066
4
- ema_pytorch-0.3.2.dist-info/METADATA,sha256=uVi-SjuBOrGBWKLct4GHX_0x16eeKVIp7795jRbaDp4,715
5
- ema_pytorch-0.3.2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
6
- ema_pytorch-0.3.2.dist-info/top_level.txt,sha256=XXFJmHviark_32Hfm5X9niezVmnRTUIhfdifCrJgXmE,12
7
- ema_pytorch-0.3.2.dist-info/RECORD,,