相关疑难解决方法(0)

模块'tensorflow'没有属性'contrib'

我正在尝试使用Tensorflow Object-Detection-API训练自己的自定义对象检测器

我在Google计算引擎中使用“ pip install tensorflow”安装了tensorflow。然后,我按照该站点上的所有说明进行操作:https : //tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html

当我尝试使用train.py时,出现以下错误消息:

追溯(最近一次通话最后一次):来自object_detection.builders的文件“ train.py”,第49行,导入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'将tensorflow导入为tf; 打印(tf。版本)':2.0.0-dev20190422

当我使用

pip3显示tensorflow:

名称:tensorflow版本:1.13.1摘要:TensorFlow是一个面向所有人的开源机器学习框架。主页:https : //www.tensorflow.org/ 作者:Google Inc.作者电子邮件:opensource@google.com许可证:Apache 2.0位置:/usr/local/lib/python3.6/dist-packages要求: gast,astor,absl-py,tensorflow估计器,keras预处理,grpcio,六,keras应用,轮,numpy,张量板,protobuf,termcolor必填:

    sudo python3 train.py --logtostderr --train_dir=training/ -- 
    pipeline_config_path=training/ssd_inception_v2_coco.config
Run Code Online (Sandbox Code Playgroud)

我该怎么做才能解决这个问题?除了以下内容,我找不到与此错误消息有关的任何东西:tensorflow'module'对象没有属性'contrib'

tensorflow

10
推荐指数
4
解决办法
2万
查看次数

标签 统计

tensorflow ×1