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

厄梅尔·奇夫奇(Omer Ciftci):

我正在尝试使用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.作者电子邮件:[email protected]许可证: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

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

mlneural03:

tf.contrib已从TF 2.0 alpha开始移出TF。
看看这些tf 2.0发行说明https://github.com/tensorflow/tensorflow/releases/tag/v2.0.0-alpha0
您可以使用tf_upgrade_v2脚本https:/将TF 1.x代码升级到TF2.x。/www.tensorflow.org/alpha/guide/upgrade

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Tensorflow 2.0-AttributeError:模块'tensorflow'没有属性'Session'

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

TensorFlow:'模块'对象没有属性'SessionRunHook'

AttributeError:模块“ tensorflow.contrib.learn”没有属性“ TensorFlowDNNClassifier”

AttributeError:模块“ tensorflow.contrib.rnn”没有属性“ stack_bidirectional_dynamic_rnn”

AttributeError:模块“ tensorflow”没有属性“ unpack”

ImportError:没有名为“ tensorflow.contrib.data”的模块

AttributeError:模块“ tensorflow”没有属性“ Session”

ModuleNotFoundError:没有名为“ tensorflow.contrib”的模块;'tensorflow'不是包

ModuleNotFoundError:没有名为“ tensorflow.contrib.framework”的模块

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

AttributeError:模块“ tensorflow”没有属性“ float32”

Tensorflow Lite:没有名为tf.contrib.lite的模块

Tensorflow:模块'tensorflow'没有属性'constant'

AttributeError:模块“ tensorflow”没有属性“ gfile”

模块Tensorflow没有属性KMeans

Tensorflow对象检测API-运行model_builder_test.py模块'tensorflow'没有属性'contrib'时出错

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

AttributeError:模块“ tensorflow_core.compat.v1”没有属性“ contrib”

将代码迁移到TF2且未获取ModuleNotFoundError:没有名为“ tensorflow.contrib.framework”的模块

AttributeError:模块“ tensorflow_datasets.text”没有属性“ YelpPolarityReviews”

模块 'tensorflow' 没有 tensorflow 2.0 版本的属性 'contrib'

AttributeError: 模块“tensorflow”没有属性“RunOptions”

如何关闭 tensorflow contrib 模块警告

ModuleNotFoundError:使用 from tensorflow.contrib.seq2seq import Helper 时没有名为“tensorflow.contrib”的模块

模块 'Tensorflow' 没有属性 'summary'

带有 AttributeError: 模块“tensorflow”没有属性“gfile”

AttributeError: 模块“tensorflow”没有属性“div”

AttributeError :模块“tensorflow”没有属性“contrib”-python 3.8