projects
/
culture.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
377f3de
)
Update.
author
François Fleuret
<francois@fleuret.org>
Tue, 24 Sep 2024 10:20:43 +0000
(12:20 +0200)
committer
François Fleuret
<francois@fleuret.org>
Tue, 24 Sep 2024 10:20:43 +0000
(12:20 +0200)
main.py
patch
|
blob
|
history
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 + m
m
ask * q
+ p[...] = (1 - mask) * p + mask * q
######################################################################