From 4e5fc31bbaf94c291f18c785b227e64bea1690cb Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Fri, 29 Jul 2022 06:05:01 +0200 Subject: [PATCH] Update. --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 83227bb..bcba9ee 100755 --- 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 ]) - #token_descr = [ [ '' ] * (l - len(s)) + s for s in token_descr ] - token_descr = [ s + [ '' ] * (l - len(s)) for s in token_descr ] + token_descr = [ [ '' ] * (l - len(s)) + s for s in token_descr ] + #token_descr = [ s + [ '' ] * (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) -- 2.39.5