An unofficial, read-only Hacker News reader. Join the beta →

The KL Divergence Is Never Negative, Except in PyTorch (opens external site)

97 points by Anon84 3 days ago | arxiv.org | 40 comments on HN

View full thread · View on Hacker News

Comment thread (1)

  1. I'm not sure why this topic blew up. For a long time I've gotten negative values a lot when using the KL div loss, so I had 0 clipping + epsilon on it? But back then I was working in float32 so I didn't care, but if you do a lot of work with fewer bits like these days, I think it could get kind of critical.