Reputation: 10075
In torch.nn.functional.interpolate what's the difference between the modes linear
and bilinear
?
To me, these are usually synonyms with regards to image resizing...
Upvotes: 3
Views: 4304
Reputation: 363
Pytorch is explicitly differentiating between 1d interpolation (linear
) and 2d interpolation (bilinear
).
They differ in the the dimensionality of the input
argument they are allowed to work on ( see here ). Specifically, linear
works on 3D inputs and bilinear
works on 4D inputs because the first two dimensions (mini-batch x channels) are understood not to be interpolated.
Upvotes: 4