projects
/
mygpt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f082ce9
)
Update.
author
Francois Fleuret
<francois@fleuret.org>
Sat, 30 Jul 2022 08:32:20 +0000
(10:32 +0200)
committer
Francois Fleuret
<francois@fleuret.org>
Sat, 30 Jul 2022 08:32:20 +0000
(10:32 +0200)
mygpt.py
patch
|
blob
|
history
diff --git
a/mygpt.py
b/mygpt.py
index
954f4f0
..
7ff1035
100755
(executable)
--- a/
mygpt.py
+++ b/
mygpt.py
@@
-125,11
+125,10
@@
class MyGPT(nn.Module):
self.readout = nn.Linear(in_features = dim_model, out_features = vocabulary_size)
def forward(self, x):
- x = F.pad(x, (1,
0
))
+ x = F.pad(x, (1,
-1
))
x = self.embedding(x)
x = self.trunk(x)
x = self.readout(x)
- x = F.pad(x, (0, 0, 0, -1))
return x
######################################################################