Right now, in the multiple decode() functions, pad_tokens is by default initialized to {} i.e. a dict. This causes
ignore_ids = pad_tokens.union({0}) to raise an AttributeError.
File "/content/DALLE-pytorch/train_dalle.py", line 642, in <module>
decoded_text = tokenizer.decode(token_list)
File "/content/DALLE-pytorch/dalle_pytorch/tokenizer.py", line 245, in decode
return self.tokenizer.decode(tokens, ignore_ids = pad_tokens.union({0}))
AttributeError: 'dict' object has no attribute 'union'
With this PR pad_tokens is initialized to set() instead.
Right now, in the multiple
decode()
functions,pad_tokens
is by default initialized to{}
i.e. a dict. This causesignore_ids = pad_tokens.union({0})
to raise an AttributeError.With this PR
pad_tokens
is initialized toset()
instead.