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
519 stars 88 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 1 year ago

Hezey commented 1 year 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 1 year 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.