AnchorLoss icon indicating copy to clipboard operation
AnchorLoss copied to clipboard

Please revise your code

Open lusinlu opened this issue 3 years ago • 1 comments

Dear Authors, with all respect to your work, based on my experiments I feel that eighter the presented text in the paper does not reflect the reality or the code that you have published contain bugs. For the purpose of empirical comparison with the other loss functions for my research I have tried to train Resnet50 on Cifar10, with the warm-up, without, with commenting log.sum(1), with clamping log(1 - pt)... in all cases, the loss is going to nan... Moreover, I can see in the issues that its not only for me, its common, no one can use the proposed loss and Im not even talking about improvements... It is very frustrating to see that the research publish in such a high venue as ICCV is not only not reproducible but just simply not working (at least implementation provided by the authors).

lusinlu avatar Apr 27 '21 10:04 lusinlu

Hi, this code was implemented based on the previous version of PyTorch. It seems like there is a numerical instability for the log computation, so I modified the code based on the internal implementation of binary cross entropy of PyTorch version 1.4.0. Sorry for the inconvenience. Also, if you train the model without cross entropy warm-up, you might have to optimize the learning rate decay scheduler. If you have the same problem with this updated code, please let me know.

slryou41 avatar May 03 '21 04:05 slryou41