Binary Cross Entropy as custom loss returns nan after a few epochs

To check the stability of your custom loss implementation you could use a wider range of input values and check the calculated losses as was done e.g. in this comparison.

2 Likes