I am using the upsampling function for semantic segmentation. It worked in 0.4, but for the 0.4.1 I got the warning

/home/john/anaconda3/lib/python3.6/site-packages/torch/nn/modules/upsampling.py:122: UserWarning: nn.Upsampling is deprecated. Use nn.functional.interpolate instead.
warnings.warn(“nn.Upsampling is deprecated. Use nn.functional.interpolate instead.”)

I am wondering that which function is better: interpolate or upsampling? Why do we make a new function like upsampling although upsampling still works fine?