From: Francois Fleuret Date: Fri, 29 Jul 2022 04:05:01 +0000 (+0200) Subject: Update. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=4e5fc31bbaf94c291f18c785b227e64bea1690cb;p=mygpt.git Update. --- 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)