当前位置: 动力学知识库 > 问答 > 编程问答 >

bad argument #2 to ?(expecting number or torch.DoubleTensor or torch.DoubleStorage at Tensor.c:1125)

问题描述:

The code i used is:

 local word2vec=nn.LookupTable(sent_len,300)

then got the error:bad argument2 # to ?(expecting number or torch.DoubleTensor or torch.DoubleStorage at Tensor.c:1125)

网友答案:

after many times trial, I finally find is the reason of type of sent_len, It should be a number type but it is not in my codes.

分享给朋友:
您可能感兴趣的文章:
随机阅读: