报错场景:
self.scores = nn.ParameterList()
self.scores.append(Parameter(torch.FloatTensor(nfeat, 1)))
for i in range(nhidlayer):
self.scores.append(Parameter(torch.FloatTensor(nhid, 1)))
## 这一句报错,也就是做矩阵乘法@时报错
s_i = torch.sigmoid(fea @ self.scores[0] + self.bias[0])
我在网上搜了很多,都是啥embedding的原因,明显跟我身处的场景不一样
https://blog.csdn.net/xiaoxiaowantong/article/details/109689146
之后,我再stackflow找到了答案,https://stackoverflow.com/questions/66567324/pytorch-error-cuda-error-cublas-status-internal-error-when-calling-cublascrea
就是pytorch的版本有问题,我之前用的版本是1.8.0,按照解决办法,换成1.7.1的。
pip uninstall torch
pip install torch==1.7.1