for feature in features:
    print("feature.shape = {}".format(feature.shape))

Output:
feature.shape = torch.Size([4, 2048, 2, 4])
feature.shape = torch.Size([2, 2048, 2, 4])
feature.shape = torch.Size([3, 2048, 2, 4])
feature.shape = torch.Size([7, 2048, 2, 4])
feature.shape = torch.Size([15, 2048, 2, 4])
feature.shape = torch.Size([6, 2048, 2, 4])
feature.shape = torch.Size([5, 2048, 2, 4])
feature.shape = torch.Size([3, 2048, 2, 4])
feature.shape = torch.Size([3, 2048, 2, 4])
feature.shape = torch.Size([8, 2048, 2, 4])

But when I run
result = torch.stack(features), I get this error:
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 8 and 4 in dimension 1 at C:/w/1/s/tmp_conda_3.6_045031/conda/conda-bld/pytorch_1565412750030/work/aten/src\THC/generic/THCTensorMath.cu:71
Anyone knows why?