Open dav-ell opened 2 years ago
@zylo117 are you planning on making further commits to this repo, or should someone fork this and apply updates elsewhere?
@dav-ell Correcting this and training from scratch will have a better mAP
value overall closer to official implementation?
The BCE calculation in FocalLoss in this repo is missing the log clamp to [-100, inf]
The current calculation is this:
https://github.com/zylo117/Yet-Another-EfficientDet-Pytorch/blob/15403b5371a64defb2a7c74e162c6e880a7f462c/efficientdet/loss.py#L115
The official implementation of BCELoss in PyTorch states this:
The correct implementation is following, which I've verified fixes the NaN problem: