RuntimeError: mat1 and mat2 shapes cannot be multiplied RuntimeError: mat1 and mat2 shapes cannot be multiplied 1 目标问题 2 原因和解决方法 原因:最后一个batch的数据少于一个batchsize解决方式:设置dataloader中drop_last=True 以上就是全部内容