ModuleNotFoundError:没有名为'nets'的模块

问题描述 投票:-1回答:1

嗨,伙计们,当我尝试使用此命令运行训练时,我遇到了错误:

> `python train.py --logtostderr --train_dir=training/
> --pipeline_config_path=training/ssd_mobilenet_v1_coco.config`

Traceback (most recent call last): File "train.py", line 51, in <module> from object_detection.builders import model_builder File "C:\tensorflow1\models\research\object_detection\builders\model_builder.py", line 35, in <module> from object_detection.models import faster_rcnn_inception_resnet_v2_feature_extractor as frcnn_inc_res File "C:\tensorflow1\models\research\object_detection\models \faster_rcnn_inception_resnet_v2_feature_extractor.py", line 28, in <module> from nets import inception_resnet_v2 ModuleNotFoundError: No module named 'nets

tensorflow object-detection-api
1个回答
0
投票

nets模块位于slim文件夹中,您需要将slim库添加到PYTHONPATH

# From tensorflow/models/research/
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
© www.soinside.com 2019 - 2024. All rights reserved.