Execution statement
seqlen = torch.tensor(10)
mask = [[1] * seqlen]
Error statement
TypeError:mul():argument 'other' (position 1) must be Tensor,not list
Error from Pytorch version It seems that it is impossible to calculate torch.tensor and list from torch> 0.3.1.
torch <= 0.31
Change before
mask = [[1] * seqlen]
After change
mask = [[1] * int(seqlen)]