【问题标题】:Attribute Error on python 3x [closed]python 3x上的属性错误[关闭]
【发布时间】:2023-04-03 20:25:01
【问题描述】:

我正在使用 tensorflow api 进行对象检测。我在 githup 上编写代码并尝试进行调试,然后我将面对这个错误。

  File "<ipython-input-10-7adfcc2a8173>", line 3, in <module>
    with detection_graph.as_defult():

AttributeError: 'Graph' object has no attribute 'as_defult'

我的相机没问题。我已经安装了每个模块所必需的

请帮帮我

谢谢你

【问题讨论】:

  • as_defult 必须是拼写错误。试试 as_default。

标签: python tensorflow graph python-3.6


【解决方案1】:

如果没有您的代码,我无法完全确定这是唯一的问题,但我认为您会因为拼写错误而遇到错误。它应该是 as_default 而不是 as_defult。请改用detection_graph.as_default()

【讨论】:

  • 非常感谢你,我多么想念我不知道。我现在有一些问题,但这里有新问题。 ValueError:名称 ':' 看起来像张量名称,但不是有效的名称。张量名称的格式必须为“:”。
  • image_tensor = detection_graph.get_tensor_by_name('image_tensor:') 我的代码是这样的
  • @RafetTürkel 您缺少 。试试 image_tensor = detection_graph.get_tensor_by_name('image_tensor:0')。
  • 嗯,对不起,我不能在这里写 0。如果你写邮件地址,我会很高兴或者你可以给我发邮件吗? rafetturkel@gmail.com
  • 我已经这样做了,但没有解决。感谢你们对我的帮助。这是我的论文。请联系我
猜你喜欢
  • 2014-04-11
  • 1970-01-01
  • 2019-03-26
  • 2016-06-04
  • 1970-01-01
  • 2021-06-05
  • 2013-08-06
相关资源
最近更新 更多