Traceback (most recent call last):
File "I:/H-Deformable-DETR/main.py", line 537, in
main(args)
File "I:/H-Deformable-DETR/main.py", line 460, in main
train_stats = train_one_epoch(
File "I:\H-Deformable-DETR\engine.py", line 96, in train_one_epoch
loss_dict = train_hybrid(
File "I:\H-Deformable-DETR\engine.py", line 48, in train_hybrid
loss_dict_one2many = criterion(outputs_one2many, multi_targets)
File "H:\miniconda\envs\H-deformable-detr\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, *kwargs)
File "I:\H-Deformable-DETR\models\deformable_detr.py", line 478, in forward
indices = self.matcher(outputs_without_aux, targets)
File "H:\miniconda\envs\H-deformable-detr\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(input, **kwargs)
File "I:\H-Deformable-DETR\models\matcher.py", line 104, in forward
C = C.view(bs, num_queries, -1).cpu()
RuntimeError: cannot reshape tensor of 0 elements into shape [1, 0, -1] because the unspecified dimension size -1 can be any value and is ambiguous
To solve your problem, would you please share with us your training/eval command and the content of the config file you use?
Also, you may try config files in our README.md to exclude that there is a problem with your coco dataset or environment/platform, since configs listed in the README.md have all been trained and tested in the Linux platform and coco2017 dataset for many times.
Traceback (most recent call last): File "I:/H-Deformable-DETR/main.py", line 537, in
main(args)
File "I:/H-Deformable-DETR/main.py", line 460, in main
train_stats = train_one_epoch(
File "I:\H-Deformable-DETR\engine.py", line 96, in train_one_epoch
loss_dict = train_hybrid(
File "I:\H-Deformable-DETR\engine.py", line 48, in train_hybrid
loss_dict_one2many = criterion(outputs_one2many, multi_targets)
File "H:\miniconda\envs\H-deformable-detr\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, *kwargs)
File "I:\H-Deformable-DETR\models\deformable_detr.py", line 478, in forward
indices = self.matcher(outputs_without_aux, targets)
File "H:\miniconda\envs\H-deformable-detr\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(input, **kwargs)
File "I:\H-Deformable-DETR\models\matcher.py", line 104, in forward
C = C.view(bs, num_queries, -1).cpu()
RuntimeError: cannot reshape tensor of 0 elements into shape [1, 0, -1] because the unspecified dimension size -1 can be any value and is ambiguous