如何在 Torch 中调整张量的大小?https://github.com/torch/torch7/blob/master/doc/tensor.md#resizing中记录的方法似乎不起作用。
images = image.load('image.png',1,'float')
print(images:size())
-- result: 224x224 [torch.LongStorage of size 2]
images.resize(torch.FloatTensor(224,224,1,1))
print(images:size())
-- result: 224x224 [torch.LongStorage of size 2]
-- expected: 224x224x1x1 [torch.LongStorage of size 4]
为什么这种方法不起作用?