You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mask.shape is [1, 8, 8]. However, the expected mask dimension should be 2D i.e a matrix , not a 3D tensor.
Error traceback
If applicable, paste the error trackback here.
Traceback (most recent call last):
File "~/Projects/mmdetection/demo/image_demo.py", line 192, in <module>
main()
File "~/Projects/mmdetection/demo/image_demo.py", line 184, in main
inferencer(**call_args)
File "~/miniconda3/envs/openmmlab/lib/python3.12/site-packages/mmdet/apis/det_inferencer.py", line 403, in __call__
preds = self.forward(data, **forward_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/miniconda3/envs/openmmlab/lib/python3.12/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "~/miniconda3/envs/openmmlab/lib/python3.12/site-packages/mmengine/infer/infer.py", line 296, in forward
return self.model.test_step(inputs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/miniconda3/envs/openmmlab/lib/python3.12/site-packages/mmengine/model/base_model/base_model.py", line 145, in test_step
return self._run_forward(data, mode='predict') # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/miniconda3/envs/openmmlab/lib/python3.12/site-packages/mmengine/model/base_model/base_model.py", line 361, in _run_forward
results = self(**data, mode=mode)
^^^^^^^^^^^^^^^^^^^^^^^
File "~/miniconda3/envs/openmmlab/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/miniconda3/envs/openmmlab/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/miniconda3/envs/openmmlab/lib/python3.12/site-packages/mmdet/models/detectors/base.py", line 94, in forward
return self.predict(inputs, data_samples)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/miniconda3/envs/openmmlab/lib/python3.12/site-packages/mmdet/models/detectors/grounding_dino.py", line 571, in predict
text_dict = self.language_model(list(text_prompts))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/miniconda3/envs/openmmlab/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/miniconda3/envs/openmmlab/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/miniconda3/envs/openmmlab/lib/python3.12/site-packages/mmdet/models/language_models/bert.py", line 165, in forward
language_dict_features = self.language_backbone(tokenizer_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/miniconda3/envs/openmmlab/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/miniconda3/envs/openmmlab/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/miniconda3/envs/openmmlab/lib/python3.12/site-packages/torch/nn/modules/container.py", line 219, in forward
input = module(input)
^^^^^^^^^^^^^
File "~/miniconda3/envs/openmmlab/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/miniconda3/envs/openmmlab/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/miniconda3/envs/openmmlab/lib/python3.12/site-packages/mmdet/models/language_models/bert.py", line 207, in forward
outputs = self.model(
^^^^^^^^^^^
File "~/miniconda3/envs/openmmlab/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/miniconda3/envs/openmmlab/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/miniconda3/envs/openmmlab/lib/python3.12/site-packages/transformers/models/bert/modeling_bert.py", line 1107, in forward
extended_attention_mask = _prepare_4d_attention_mask_for_sdpa(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/miniconda3/envs/openmmlab/lib/python3.12/site-packages/transformers/modeling_attn_mask_utils.py", line 439, in _prepare_4d_attention_mask_for_sdpa
_, key_value_length = mask.shape
^^^^^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 2)
The text was updated successfully, but these errors were encountered:
Thanks for your error report and we appreciate it a lot.
Checklist
Describe the bug
A clear and concise description of what the bug is.
Reproduction
No.
xdecoder/demo
Environment
python mmdet/utils/collect_env.py
to collect necessary environment information and paste it here.Errors occurs in
bert.py
:mask.shape is [1, 8, 8]. However, the expected mask dimension should be 2D i.e a matrix , not a 3D tensor.
Error traceback
If applicable, paste the error trackback here.
The text was updated successfully, but these errors were encountered: