Ah I see! Somehow I get the same error except in a different dimension
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 2 and 4 in dimension 0 at C:/w/1/s/tmp_conda_3.6_045031/conda/conda-bld/pytorch_1565412750030/work/aten/src\THC/generic/THCTensorMath.cu:71
but I was looking through a Github repo and they did what would be the equivalent of
features.append(torch.mean(feature,0)) in my code. That seems to solve the issue (though I don’t get why), but I get a different error now.