模块未发现错误:没有为对象检测 API 命名的'nets'模块



我正在尝试在colab上训练TF对象检测模型,并且我在$PYTHONPATH中添加了"slim"

['/env/python',
'/content/gdrive/My\ Drive/Real_Traffic_Vehicle_Detector/models/research',
'/content/gdrive/My\ Drive/Real_Traffic_Vehicle_Detector/models/research/slim',
'/content/gdrive/My\Drive/Real_Traffic_Vehicle_Detector/models/research/object_detection',

但即便如此,当我尝试运行 train.py 文件时,它也会显示错误,没有名为"nets"的模块。 谁能帮我?

警告:Tensorflow:TensorFlow contrib 模块将不包括在内 在 TensorFlow 2.0 中。欲了解更多信息,请参阅: * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md * https://github.com/tensorflow/addons * https://github.com/tensorflow/io (对于 I/O 相关操作( 如果你依赖 对于此处未列出的功能,请提交问题。

回溯(最近一次调用(:文件 "train.py",第 52 行,在 从object_detection.builders导入model_builder文件"/usr/local/lib/python3.6/dist-packages/object_detection/builders/model_builder.py", 第 35 行,在 从 object_detection.models 导入faster_rcnn_inception_resnet_v2_feature_extractor作为frcnn_inc_res
文件 "/usr/local/lib/python3.6/dist-packages/object_detection/models/faster_rcnn_inception_resnet_v2_feature_extractor.py", 第 28 行,在 从网络导入inception_resnet_v2模块未发现错误:没有名为"nets"的模块

你应该从

My\ Drive

为了

My Drive

因为它已经在字符串引号中。

最新更新