UserWarning: nn.functional.upsample is deprecated. Use nn.functional.interpolate instead

UserWarning: nn.functional.upsample is deprecated. Use nn.functional.interpolate instead

在这里插入图片描述
版本问题导致的
import torch.nn.functional as F
把F.upsample换成F.interpolate就行

你可能感兴趣的:(报错bug,bug,pytorch,深度学习,神经网络)