The warning message came from https://github.com/pytorch/pytorch/blob/ba5d33bedeec57bb35cf27a9d6023c8b3676dda5/torch/nn/modules/upsampling.py#L121 354.
I think you may ignore the warning if you are just using nn.Upsample as a layer.