问题描述:

在这里插入图片描述


原因分析:

要告诉解释器对应的模块在哪里


解决方案:

方法一:

import torch.nn.functional as F

from unet_parts import *
改成
import torch.nn.functional as F

import sys
sys.path.append("./unet_parts")

from unet_parts import *

方法二:
在这里插入图片描述点击项目-> 右键选择Mark Directory as -> sources root

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐