Switchable-Whitening
Switchable-Whitening copied to clipboard
Train model with apex
Hello, I use apex train the model with the level 'O1',ie fp16 ,but the loss is nan, if i train the model with fp32,the loss is normal,Do you have the same problem
Sorry I haven't tried training with apex. It seems that there is a numerical issue with fp16, you may simply use fp32.
I had the same problem. We need a way to exclude SW layer from O2 just like BN. But I have not found a proper way
the problem may be cause by numerical underflow in https://github.com/XingangPan/Switchable-Whitening/blob/master/models/ops/switchwhiten.py#L175 ?
I think maybe add a eps here can solve it ?