projects
/
mygpt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e68f196
)
Update.
author
Francois Fleuret
<francois@fleuret.org>
Fri, 29 Jul 2022 04:05:01 +0000
(06:05 +0200)
committer
Francois Fleuret
<francois@fleuret.org>
Fri, 29 Jul 2022 04:05:01 +0000
(06:05 +0200)
main.py
patch
|
blob
|
history
diff --git
a/main.py
b/main.py
index
83227bb
..
bcba9ee
100755
(executable)
--- a/
main.py
+++ b/
main.py
@@
-160,8
+160,8
@@
class TaskPicoCLVR(Task):
def tensorize(self, descr):
token_descr = [ s.strip().split(' ') for s in descr ]
l = max([ len(s) for s in token_descr ])
def tensorize(self, descr):
token_descr = [ s.strip().split(' ') for s in descr ]
l = max([ len(s) for s in token_descr ])
-
#
token_descr = [ [ '<nul>' ] * (l - len(s)) + s for s in token_descr ]
- token_descr = [ s + [ '<nul>' ] * (l - len(s)) for s in token_descr ]
+ token_descr = [ [ '<nul>' ] * (l - len(s)) + s for s in token_descr ]
+
#
token_descr = [ s + [ '<nul>' ] * (l - len(s)) for s in token_descr ]
id_descr = [ [ self.token2id[u] for u in s ] for s in token_descr ]
return torch.tensor(id_descr, device = self.device)
id_descr = [ [ self.token2id[u] for u in s ] for s in token_descr ]
return torch.tensor(id_descr, device = self.device)