songyouwei / ABSA-PyTorch

Aspect Based Sentiment Analysis, PyTorch Implementations. 基于方面的情感分析,使用PyTorch实现。
MIT License
2.02k stars 525 forks source link

使用MGAN模型报错 #221

Open cheemsbaby opened 1 year ago

cheemsbaby commented 1 year ago

File "D:\代码\文本\ABSA-PyTorch\models\mgan.py", line 56, in forward alignment_mat[:, i, j] = feat.matmul(self.w_u.expand(batch_size, -1, -1)).squeeze(-1).squeeze(-1) RuntimeError: Expected object of scalar type Double but got scalar type Float for argument #2 'mat2' in call to _th_bmm_out