ModuleNotFoundError:没有名为“ nets”的模块

时间:2019-04-02 13:10:02

标签: tensorflow object-detection-api

嗨,我在尝试使用以下命令进行训练时遇到错误:

> `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

1 个答案:

答案 0 :(得分:0)

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

# From tensorflow/models/research/
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim