DiffusionDet icon indicating copy to clipboard operation
DiffusionDet copied to clipboard

Why permute pro_features and why `[0]` here?

Open Naruto-Sasuke opened this issue 3 years ago • 1 comments

https://github.com/ShoufaChen/DiffusionDet/blob/1efb36d4b0b721f2d509bc72656235a94d73ab02/diffusiondet/head.py#L253-L254

  1. Before passing proposal feature into self.attn, you permute the feature and make the size of it be nr_boxes*N*C, it confused me.

For normal transformer block, the feature should be with size N*num_tokens*C however yours nr_boxes*N*C, Why ?

  1. [0] makes the feature be N*C by dragging out the first bbox ?

Naruto-Sasuke avatar Dec 16 '22 12:12 Naruto-Sasuke

Oh, I have known the reason of Q2, however still confused about Q1, would you mind explain it to me ? Thank you!

Naruto-Sasuke avatar Dec 17 '22 02:12 Naruto-Sasuke