Zzh-tju / DIoU-SSD-pytorch

Distance-IoU Loss: Faster and Better Learning for Bounding Box Regression (AAAI 2020)
GNU General Public License v3.0
87 stars 24 forks source link

Error in MultiBoxLoss #6

Open TimothyZero opened 4 years ago

TimothyZero commented 4 years ago
self.gious = IouLoss(pred_mode = 'Center',size_sum=True,variances=self.variance, losstype=self.loss)
        if self.loss != 'SmoothL1' or self.loss !='Giou':
            assert Exception("THe loss is Error, loss name must be SmoothL1 or Giou")

        else:
            match_ious(self.threshold, truths, defaults, self.variance, labels, loc_t, conf_t, idx)

??? no truths, defaults,labels, loc_t, conf_t, idx

shsjxzh commented 4 years ago

I have the same confusion. In addition, I also don't understand what this assertion means, despite the fact that it will not interrupt the programme. @Zzh-tju Could you please explain the above code? Thanks a lot!

Zzh-tju commented 4 years ago

The error listed above I have encountered before and I don't know. And I forgot how I dealt with it.

The assertion is just because I was lazy. So I directly use the code https://github.com/JaryHuang/awesome_SSD_FPN_GIoU