Update.
authorFrançois Fleuret <francois@fleuret.org>
Tue, 24 Sep 2024 10:20:43 +0000 (12:20 +0200)
committerFrançois Fleuret <francois@fleuret.org>
Tue, 24 Sep 2024 10:20:43 +0000 (12:20 +0200)
main.py

diff --git a/main.py b/main.py
index 09e3c59..b2b0492 100755 (executable)
--- a/main.py
+++ b/main.py
@@ -877,7 +877,7 @@ def inject_plasticity(model, proba):
     with torch.no_grad():
         for p, q in zip(model.parameters(), dummy.parameters()):
             mask = (torch.rand(p.size()) <= proba).long()
-            p[...] = (1 - mask) * p + mmask * q
+            p[...] = (1 - mask) * p + mask * q
 
 
 ######################################################################