The bicubic interpolation code accesses non-allocated memory when src_len is 1 because it doesn't have a special case like bilinear interpolation does. This PR addresses that bug.
I ran the following test to confirm it works:
require 'image'
im = torch.randn(3, 2, 3):float()
for n = 1,1000 do resim = image.scale(im, 256, 768, 'bicubic') end
The bicubic interpolation code accesses non-allocated memory when
src_len
is 1 because it doesn't have a special case like bilinear interpolation does. This PR addresses that bug.I ran the following test to confirm it works: