UserWarning: nn.functional.upsample is deprecated. Use nn.functional.interpolate instead 版本问题导致的 import torch.nn.functional as F 把F.upsample换成F.interpolate就行