File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -174,6 +174,13 @@ def forward(
174174 # for the prompt ids not initialized yet, hard copy over the initial superclass outputs
175175 self .superclass_output .data .copy_ (superclass_output )
176176
177+ elif exists (superclass_output ):
178+ # if text enc with superclass is passed in for more than 1 batch
179+ # just take the opportunity to exponentially average it a bit more
180+
181+ ema_superclass_output = self .superclass_output * decay + superclass_output * (1. - decay )
182+ self .superclass_output .data .copy_ (ema_superclass_output )
183+
177184 # if any in the batch is not initialized, initialize
178185
179186 if not initted :
Original file line number Diff line number Diff line change 33setup (
44 name = 'perfusion-pytorch' ,
55 packages = find_packages (exclude = []),
6- version = '0.0.17 ' ,
6+ version = '0.0.18 ' ,
77 license = 'MIT' ,
88 description = 'Perfusion - Pytorch' ,
99 author = 'Phil Wang' ,
You can’t perform that action at this time.
0 commit comments