RuntimeError:The size of tensor a (100) must match the size of tensor b (12800) at non-singleton di

阅读 67

2022-03-14

问题:维度不对应,一个第一维是1,另一个第一维是128

解决:往前追溯,发现问题根源,使用repeat将其改为128维:

 注意:这里要使用.size()将其改为128维,而不能直接写128,负责运行几轮后便会报错。

精彩评论(0)

0 0 举报