kemaloksuz / RankSortLoss

Official PyTorch Implementation of Rank & Sort Loss for Object Detection and Instance Segmentation [ICCV2021]
Apache License 2.0
238 stars 25 forks source link

train errror #9

Closed Muke6 closed 3 years ago

Muke6 commented 3 years ago

ranking_loss, sorting_loss = self.loss_rank.apply(flat_preds, flat_labels) File "/media/ymhj/data/kxp/zkxt/RankSortLoss-main/mmdet/models/losses/ranking_losses.py", line 18, in forward threshold_logit = torch.min(fg_logits)-delta_RS RuntimeError: m

kemaloksuz commented 3 years ago

Could you please provide more details on the error? E.g. which model are you trying to train, which dataset, how many GPUs etc.

Muke6 commented 3 years ago

My model is ranksort_cascade_rcnn_r50_fpn_1x_coco.py,coco dataset,1GPU for 3080ti .At some point in the firstepoch, line 18 of file RankSortLoss-main/mmdet/models/losses/ranking_losses.py, the argument disappears. fg_num: 0 fg_logits: tensor([], device='cuda:0') File "/media/ymhj/data/kxp/zkxt/RankSortLoss-main/mmdet/models/losses/ranking_losses.py", line 18, in forward threshold_logit = torch.min(fg_logits)-delta_RS RuntimeError: min(): Expected reduction dim to be specified for input.numel() == 0. Specify the reduction dim with the 'dim' argument.

kemaloksuz commented 3 years ago

Can you please also specify your learning rate and batch size on 1 GPU?

Muke6 commented 3 years ago

I solved the problem. Thank you. I'll star

ApoorvaSuresh commented 2 years ago

Hi, I have a similar error: RuntimeError: max(): Expected reduction dim to be specified for input.numel() == 0. Specify the reduction dim with the 'dim' argument.

Could you please share how you solved your problem?

Thanks in advance :)