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

RuntimeError: Sizes of tensors must match except in dimension 0. Got 0 and 300 (The offending index is 0) #69

Open Hezey opened 11 months ago

Hezey commented 11 months ago

When I was training my own data set with DN-DETR, I encountered the following problems, how do I solve them? Who can tell me, please? @sorrowyn @whatchang @SlongLiu @developer0hye @rentainhe

Traceback (most recent call last): tgt = torch.cat([tgt_weight, indicator0], dim=1) + label_enc.weight[0][0]*torch.tensor(0).cuda() RuntimeError: Sizes of tensors must match except in dimension 0. Got 0 and 300 (The offending index is 0)

sorrowyn commented 11 months ago

When I was training my own data set with DN-DETR, I encountered the following problems, how do I solve them? Who can tell me, please? @sorrowyn @whatchang @SlongLiu @developer0hye @rentainhe

Traceback (most recent call last): tgt = torch.cat([tgt_weight, indicator0], dim=1) + label_enc.weight[0][0]*torch.tensor(0).cuda() RuntimeError: Sizes of tensors must match except in dimension 0. Got 0 and 300 (The offending index is 0)

https://blog.csdn.net/weixin_40802676/article/details/108145671 or you can search in google.