
类似上图这种结构,resnet_inference.py中需要导入tools中的py文件,代码为
import sys
sys.path.append("..")
from tools.common_tools import ModelTrainer
需要注意的是,被引用文件夹中必须创建__init__.py,空文件也没关系

类似上图这种结构,resnet_inference.py中需要导入tools中的py文件,代码为
import sys
sys.path.append("..")
from tools.common_tools import ModelTrainer
需要注意的是,被引用文件夹中必须创建__init__.py,空文件也没关系
2436
10万+
1394
2600
5358

被折叠的 条评论
为什么被折叠?