7
如何調整火炬張量?記錄在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]
爲什麼這種方法不起作用?