Pytorch常遇到的错误汇总
2018-03-13 本文已影响182人
吐舌小狗
1.torch.cat时dim设置错误
torch.cat((a,b),1) RuntimeError: inconsistent tensor sizes at /opt/conda/conda-bld/pytorch_1512378360668/work/torch/lib/TH/generic/THTensorMath.c:2864
解决方案:查看变量的size,修改torch.dim中dim的值