ne7ermore / torch-light

Deep-learning by using Pytorch. Basic nns like Logistic, CNN, RNN, LSTM and some examples are implemented by complex model.
MIT License
535 stars 201 forks source link

报错 #15

Open yt-liang opened 4 years ago

yt-liang commented 4 years ago

image 您好,LSTM-CNNS-CRF中,运行train.py,报错RuntimeError: Expected tensor for argument #1 'indices' to have scalar type Long; but got torch.IntTensor instead (while checking arguments for embedding)。显示是model(word,char,label)的问题

ne7ermore commented 4 years ago

确认下pytorch的版本是不是0.4.0

GZC201314 commented 4 years ago

我的也是这个错误,使用的pytorch是0.4.0 RuntimeError: Expected tensor for argument #1 'indices' to have scalar type Long; but got torch.IntTensor instead (while checking arguments for embedding)。