Hey! Thanks for the suggestion. This would work for my training scheme where I know that my input is 321x321.
But in the inference phase, the input image size is not fixed and I want a cleaner way where I can upsample by simply specifying the target size.
For example, this is the behavior I want

feature_map = net(input) // The size of the feature map depends on the size of input
output = torch.nn.Upsample(size = input_size) // input_size is the size of input

Please write back if I didn’t make something clear.