我正在尝试使用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'
三周前我能够运行我的 python 程序,但现在每次我尝试运行它时,我都会收到以下错误:
AttributeError: module 'tensorflow' has no attribute 'placeholder'
Run Code Online (Sandbox Code Playgroud)
我安装了 tensorflow(版本“2.0.0-alpha0”)。我已经阅读了几篇与此问题相关的帖子。他们说我应该卸载 TensorFlow 并重新安装它。问题是我在集群计算机上运行它并且我没有sudo权限。
任何的想法?
我已经在 Ubuntu 16.10 环境中从 Source 安装了 tensorflow。一切都很顺利,但现在在编译程序时,它显示以下错误:
Traceback (most recent call last):
File "ff.py", line 3, in <module>
sess = tf.InteractiveSession()
AttributeError: module 'tensorflow' has no attribute 'InteractiveSession'
Run Code Online (Sandbox Code Playgroud)
没有找到与此相关的帖子。有人可以帮忙吗?