嗨,我在尝试使用以下命令进行训练时遇到错误:
> `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
答案 0 :(得分:0)
nets
模块位于slim
文件夹中,您需要将slim
库添加到PYTHONPATH
:
# From tensorflow/models/research/
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim