Use Upsample+Conv as below
>>> print(input.size())
512×64×64
>>> up = nn.Upsample(mode='nearest', scale_factor=2)
>>> up_input = m(input)
>>> net = nn.Conv2d(512, 512, kernal_size=3, padding=1)
>>> out = net(up_input)
>>> print(out.size())
512×128×128