Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hello,when I run vis.py,I find the erro.RuntimeError: shape mismatch: value tensor of shape [21, 256, 8, 25] cannot be broadcast to indexing result of shape [21, 256, 8, 8] #12

Open
fuzheng1209 opened this issue Feb 23, 2024 · 1 comment

Comments

@fuzheng1209
Copy link

Traceback (most recent call last):
File "vis.py", line 53, in
output = model(image[None].cuda())
File "/home/lyk/anaconda3/envs/detectron2/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/lyk/fz/ESTextSpotter/models/ests/ests.py", line 293, in forward
hs, reference, rec_references, hs_enc, ref_enc, init_box_proposal = self.transformer(srcs, masks, input_query_bbox, poss,input_query_label,attn_mask, H, W)
File "/home/lyk/anaconda3/envs/detectron2/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/lyk/fz/ESTextSpotter/models/ests/deformable_transformer.py", line 396, in forward
roi_features = self.pooler(srcs[:-2], proposal_boxes)
File "/home/lyk/anaconda3/envs/detectron2/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in call_impl
result = self.forward(*input, **kwargs)
File "/home/lyk/anaconda3/envs/detectron2/lib/python3.8/site-packages/detectron2/modeling/poolers.py", line 243, in forward
output.index_put
((inds,), pooler(x[level], pooler_fmt_boxes_level))
RuntimeError: shape mismatch: value tensor of shape [21, 256, 8, 25] cannot be broadcast to indexing result of shape [21, 256, 8, 8]

@mxin262
Copy link
Owner

mxin262 commented Mar 22, 2024

Use the detectron2 in this repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants