TypeError: unhashable type: 'list'. When running "model_builder_tf2_test.py"

未关闭
#11,161 9 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@laxmareddyp 已经在做这个了。

开始于 2024年2月13日。

评估

这个 Issue 还没有评估数据。

描述

models:research type:bug

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • [ x] I am using the latest TensorFlow Model Garden release and TensorFlow 2.
  • [ x] I am reporting the issue to the correct repository. (Model Garden official or research directory)
  • [x ] I checked to make sure that this issue has not been filed already.

1. The entire URL of the file you are using

https://github.com/tensorflow/models/blob/master/research/object_detection/builders/model_builder_tf2_test.py

2. Describe the bug

Whenever I run the file I get the following error:

2024-02-13 17:26:05.504018: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
Traceback (most recent call last):
  File "C:\programacao\CNN-JUPYTER\TFODCourse\Tensorflow\models\research\object_detection\builders\model_builder_tf2_test.py", line 21, in <module>
    import tensorflow.compat.v1 as tf
  File "C:\Users\rodri\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\__init__.py", line 45, in <module>
    from tensorflow._api.v2 import __internal__
  File "C:\Users\rodri\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\_api\v2\__internal__\__init__.py", line 8, in <module>
    from tensorflow._api.v2.__internal__ import autograph
  File "C:\Users\rodri\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\_api\v2\__internal__\autograph\__init__.py", line 8, in <module>
    from tensorflow.python.autograph.core.ag_ctx import control_status_ctx # line: 34
  File "C:\Users\rodri\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\autograph\core\ag_ctx.py", line 21, in <module>
    from tensorflow.python.autograph.utils import ag_logging
  File "C:\Users\rodri\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\autograph\utils\__init__.py", line 17, in <module>
    from tensorflow.python.autograph.utils.context_managers import control_dependency_on_returns
  File "C:\Users\rodri\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\autograph\utils\context_managers.py", line 19, in <module>
    from tensorflow.python.framework import ops
  File "C:\Users\rodri\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\framework\ops.py", line 5906, in <module>
    ) -> Optional[Callable[[Any], message.Message]]:
  File "C:\Users\rodri\AppData\Local\Programs\Python\Python39\lib\typing.py", line 262, in inner
    return func(*args, **kwds)
  File "C:\Users\rodri\AppData\Local\Programs\Python\Python39\lib\typing.py", line 339, in __getitem__
    return self._getitem(self, parameters)
  File "C:\Users\rodri\AppData\Local\Programs\Python\Python39\lib\typing.py", line 463, in Optional
    return Union[arg, type(None)]
  File "C:\Users\rodri\AppData\Local\Programs\Python\Python39\lib\typing.py", line 262, in inner
    return func(*args, **kwds)
  File "C:\Users\rodri\AppData\Local\Programs\Python\Python39\lib\typing.py", line 339, in __getitem__
    return self._getitem(self, parameters)
  File "C:\Users\rodri\AppData\Local\Programs\Python\Python39\lib\typing.py", line 451, in Union
    parameters = _remove_dups_flatten(parameters)
  File "C:\Users\rodri\AppData\Local\Programs\Python\Python39\lib\typing.py", line 231, in _remove_dups_flatten
    return tuple(_deduplicate(params))
  File "C:\Users\rodri\AppData\Local\Programs\Python\Python39\lib\typing.py", line 205, in _deduplicate
    all_params = set(params)
TypeError: unhashable type: 'list'

3. Steps to reproduce

Clone the repo and run the file

4. Expected behavior

The file should run the tests without any errors

5. Additional context

This has been happening for a while with the file: https://github.com/tensorflow/models/blob/master/research/object_detection/model_main_tf2.py
I reinstalled everything and ran the file in a virtual environment to see if it fixed itself and it didn't. This error happens with both the est file and the normal file.

6. System information

  • Windows 10 22H2 19045.3930
  • Mobile device name if the issue happens on a mobile device:
  • TensorFlow installed from binary
  • TensorFlow version (use command below): 2.15.0
  • Python version: 3.9.1
  • Bazel version (if compiling from source):
  • GCC/Compiler version (if compiling from source):
  • CUDA/cuDNN version: Not using
  • GPU model and memory: Not using
主要语言
Python
星标
77.6k
派生
44.8k
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

tensorflow/models 的其他 Issue

查看 tensorflow/models 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。