IDEA-Research / DAB-DETR

[ICLR 2022] Official implementation of the paper "DAB-DETR: Dynamic Anchor Boxes are Better Queries for DETR"
Apache License 2.0
501 stars 86 forks source link

The feature dim mismatch? #32

Closed Rain-coder1 closed 2 years ago

Rain-coder1 commented 2 years ago

https://github.com/IDEA-opensource/DAB-DETR/blob/309f6ad92af7a62d7732c1bdf1e0c7a69a7bdaef/models/DAB_DETR/transformer.py#L446 In this place, the last dim of tgt2 is 2*256, while the tgt's last dim is 256, so it will cause a mismatch error?

SlongLiu commented 2 years ago

Actually, it won't. The last dim of tgt2 is 256 as well. we use the first 256 dimensions of positional encoded anchors for cross-attention modules.