Closed leijue222 closed 3 years ago
I know the further reason, the problem still lies in data processing. In here: https://github.com/thuiar/MMSA/blob/b2e70bbd198ba8e8dc041f5e059c3baa2027b34a/models/subNets/BertTextEncoder.py#L47-L55
The previous version: The data's text shape is torch.Size([64, 39, 768])
The latest version: The pkl your provide shape of text is torch.Size([32, 3, 39]). The pkl generated by DataPre.py, the text shape is torch.Size([32, 39, 3])
Unfortunately, changing the dimensions still does not solve the problem.
If I use text = text.permute(0,2,1)
to correct dimension.
When I run slef_mm, the error is
raise ValueError(msg_err.format(type_err, X.dtype))
ValueError: Input contains NaN, infinity or a value too large for dtype('float32').
File "models/singleTask/MISA.py", line 198, in alignment
masked_output = torch.mul(bert_sent_mask.unsqueeze(2), bert_output)
RuntimeError: The size of tensor a (3) must match the size of tensor b (39) at non-singleton dimension 1
@iyuge2 @Columbine21 Hi, have a problem when I run
run.py
file. Hope to get your helpThe error is located in BertTextEncoder.py :
https://github.com/thuiar/MMSA/blob/b2e70bbd198ba8e8dc041f5e059c3baa2027b34a/models/subNets/BertTextEncoder.py#L62-L64
Error in line 62, I still don't know how to solve this problem.
Detailed error message: