RuntimeError: mat1 and mat2 shapes cannot be multiplied (64x640 and 128x128)
问题展示:
RuntimeError: mat1 and mat2 shapes cannot be multiplied (3822x1700 and 6497400x10)
解决方案:
参考:https://blog.csdn.net/qq_42079689/article/details/102873766
问题出现原因是全连接层的输入是二维张量,输入数据需要进行一次转换。
# edge_detect 维度1*3*1274*1700
edge_detect1=edge_detect.view(1*1274*1700*3)
# edge_detect1 维度6497400