Nealcly / BiLSTM-LAN

Hierarchically-Refined Label Attention Network for Sequence Labeling
Apache License 2.0
285 stars 50 forks source link

TypeError:mul():argument 'other' (position 1) must be Tensor,not list #6

Open ChiYing212 opened 4 years ago

ChiYing212 commented 4 years ago

when I run the main.py, the above problems occurs in line 213 (line 213 is "mask[idx,:seqlen] = torch.Tensor([1]*seqlen)")

Nealcly commented 4 years ago

May I ask which Pytorch version you used?

ChiYing212 commented 4 years ago

0.3.1

satori555 commented 4 years ago

when I run the main.py, the above problems occurs in line 213 (line 213 is "mask[idx,:seqlen] = torch.Tensor([1]*seqlen)")

Pytorch 0.3.1 shoule be ok, for newer version, just modify seqlen as seqlen.item()

wshzd commented 4 years ago

torch 0.3.0b0+591e73e that is my torch version above,l can run correctly.

chiyuzhang94 commented 4 years ago

Hi, I am also trying to use the tool. But I am wondering where the dataset is. I saw you run this model and posted issues. What dataset did you use? Could you please share with me?

yhjiujiu commented 4 years ago

mask[idx,:seqlen] = torch.Tensor(torch.tensor([1])*seqlen)"

popkarthb commented 2 years ago

Check your input data parameter. Make sure it is in 123123 not in [123123]