projects
/
mygptrnn.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f06a70e
)
Update.
author
François Fleuret
<francois@fleuret.org>
Sat, 6 Jan 2024 13:49:59 +0000
(14:49 +0100)
committer
François Fleuret
<francois@fleuret.org>
Sat, 6 Jan 2024 13:49:59 +0000
(14:49 +0100)
mygpt.py
patch
|
blob
|
history
diff --git
a/mygpt.py
b/mygpt.py
index
9bacaff
..
c061eb4
100755
(executable)
--- a/
mygpt.py
+++ b/
mygpt.py
@@
-545,6
+545,8
@@
class Caterpillar(nn.Module):
torch.einsum("ntc,hec->nhet", X, self.w_G) + self.b_G[None, :, :, None]
).sigmoid()
+ G = F.dropout(G, self.attention_dropout, self.training)
+
V = torch.einsum("ntc,hdc->nhtd", X, self.w_V)
K = torch.einsum("ntc,hdc->nhtd", X, self.w_K)