projects
/
mygpt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84748a0
)
Added a null token, which is the one to predict.
author
Francois Fleuret
<francois@fleuret.org>
Tue, 26 Jul 2022 11:27:58 +0000
(13:27 +0200)
committer
Francois Fleuret
<francois@fleuret.org>
Tue, 26 Jul 2022 11:27:58 +0000
(13:27 +0200)
main.py
patch
|
blob
|
history
diff --git
a/main.py
b/main.py
index
4a332b8
..
e973291
100755
(executable)
--- a/
main.py
+++ b/
main.py
@@
-204,7
+204,7
@@
class TaskPicoCLVR(Task):
t_generated = [ ]
for j in range(nb_tokens):
- t = [ [ self.token2id[u] for u in t_primer + t_generated ] ]
+ t = [ [ self.token2id[u] for u in t_primer + t_generated ]
+ [ 0 ]
]
input = torch.tensor(t, device = self.device)
output = model(input)
logits = output[0, -1]