Is there a way to upsample a image with non int scale_factor?
For example, I want upsample my image with scale_factor 1.5.
xiaochao_qu
Do you need this transform to be differentiable, or just to use it as part of the data loading?
apaszke
<SCODE>import torch
import torch.nn as nn
from torch.autograd import Variable


inp = Variable(torch.randn(10, 3, 24, 24))
m = nn.UpsamplingBilinear2d(size=(55, 55))
out = m(inp)
print(out.size())
<ECODE>
smth
I need it to be differentiable, as I am doing a pixel-to-pixel task which requires the output size is different with the input size.
xiaochao_qu
Thanks. Is this operation differentiable?
xiaochao_qu
smth
xiaochao_qu
This appears to give an error saying that the upsampled size is not divisible by the original size when done with UpsampleNearest2d rather than UpsampleBilinear2d
meldefon
vinaykumar2491