【发布时间】:2019-09-16 02:47:36
【问题描述】:
我正在尝试使用 Tensorflow Object-Detection-API 训练我自己的自定义对象检测器
我在我的谷歌计算引擎中使用“pip install tensorflow”安装了 tensorflow。然后我按照这个网站上的所有说明进行操作:https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html
当我尝试使用 train.py 时,我收到以下错误消息:
Traceback(最近一次调用最后一次): 文件“train.py”,第 49 行,在 从 object_detection.builders 导入 dataset_builder 文件“/usr/local/lib/python3.6/dist-packages/object_detection-0.1->py3.6.egg/object_detection/builders/dataset_builder.py”,第 27 行,在 从 object_detection.data_decoders 导入 tf_example_decoder 文件“/usr/local/lib/python3.6/dist-packages/object_detection-0.1-py3.6.egg/object_detection/data_decoders/tf_example_decoder.py”,第 27 行,在 slim_example_decoder = tf.contrib.slim.tfexample_decoder AttributeError:模块“tensorflow”没有属性“contrib”
当我尝试学习 tensorflow 版本时,我也得到了不同的结果。
python3 -c '将张量流导入为 tf;打印(tf.版本)':2.0.0-dev20190422
当我使用时
pip3 显示张量流:
名称:张量流 版本:1.13.1 总结:TensorFlow 是一个适合所有人的开源机器学习框架。 主页:https://www.tensorflow.org/ 作者:谷歌公司 作者邮箱:opensource@google.com 许可证:Apache 2.0 位置:/usr/local/lib/python3.6/dist-packages 需要:gast、astor、absl-py、tensorflow-estimator、keras-preprocessing、grpcio、六、keras-applications、wheel、numpy、tensorboard、protobuf、termcolor 要求:
sudo python3 train.py --logtostderr --train_dir=training/ --
pipeline_config_path=training/ssd_inception_v2_coco.config
我应该怎么做才能解决这个问题?除了这个,我找不到关于这个错误消息的任何信息:tensorflow 'module' object has no attribute 'contrib'
【问题讨论】:
-
如果你得到这个问题,你能发布一个解决方案吗?我还在挣扎。
标签: tensorflow