首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >当我尝试运行tf_pose时,我遇到了麻烦

当我尝试运行tf_pose时,我遇到了麻烦
EN

Stack Overflow用户
提问于 2021-04-28 17:17:38
回答 1查看 470关注 0票数 1

我试图使用tf-姿态使用tensorflow version2。

代码语言:javascript
复制
!git clone https://github.com/gsethi2409/tf-pose-estimation.git > /dev/null
%cd tf-pose-estimation
!pip3 install -r requirements.txt

这是我克隆的地方。但是当我运行下面的代码时。它显示出一个错误。

代码语言:javascript
复制
!python run.py --model=mobilenet_thin --resize=432x368 --image=./images/p1.jpg

回溯(最近一次调用):文件"run.py",第39行,在e= TfPoseEstimator(get_graph_path(args.model),target_size=(w,h)文件第337行)中,在init self.tensor_image = self.graph.get_tensor_by_name('TfPoseEstimator/image:0') File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/ops.py",第3902行中在"/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/ops.py",返回self.as_graph_element(name,allow_tensor=True,allow_operation=False)文件的第3726行中,在as_graph_element返回self._as_graph_element_locked(obj,allow_tensor,allow_operation)文件的第3768行,在_as_graph_element_locked“图”中,% (repr( name ),repr(Op_name)) KeyError:'TfPoseEstimator/image:0‘是指不存在的张量。图中不存在'TfPoseEstimator/image‘操作。“

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-06-03 08:47:41

在导入tensorflow的行下的tf_pose/Parameatory.py中,添加以下行

tf.compat.v1.disable_eager_execution() 链接

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67304944

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档