gpt4 book ai didi

python - Tensorflow无法训练模型

转载 作者:太空宇宙 更新时间:2023-11-03 20:27:33 25 4
gpt4 key购买 nike

我已按照本教程来训练我的自定义对象,但在训练模型步骤中执行以下命令:

python train.py --logtostderr --train_dir=training/--pipeline_config_path=training/ssd_inception_v2_coco.config

我得到这个结果:

(tensorflow_cpu) C:\Users\sid\Documents\Tensorflow\models\research\object_detection\legacy>python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_inception_v2_coco.config

Traceback (most recent call last):
File "train.py", line 51, in <module>
from object_detection.builders import model_builder
File "C:\Users\sid\Anaconda3\envs\tensorflow_cpu\lib\site-packages\object_detection-0.1-py3.6.egg\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:\Users\sid\Anaconda3\envs\tensorflow_cpu\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\models\faster_rcnn_inception_resnet_v2_feature_extractor.py", line 29, in <module>
from nets import inception_resnet_v2
ModuleNotFoundError: No module named 'nets'

最佳答案

您可能需要安装软件包“nets”

在 Linux 中,这意味着在终端中输入以下内容:

pip install nets

当然,那么你需要在 python 脚本中添加导入行:

import nets

关于python - Tensorflow无法训练模型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57716770/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com