一、报错原因: 矩阵mat1 的第二维度要与mat2的第一维度不匹配。 二、解决办法: 报错解决——RuntimeError: mat1 dim 1 must match mat2 dim 0彻底解决Torch[mat1 dim 1 must match mat2 dim 0]