From c0019b5af155be6a8af02bf71a62c43af1d7a178 Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Sat, 30 Jul 2022 10:32:20 +0200 Subject: [PATCH] Update. --- mygpt.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mygpt.py b/mygpt.py index 954f4f0..7ff1035 100755 --- 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 ###################################################################### -- 2.39.5