Margin Ranking loss in the wild

Hi all,

I’m a big fan of margin ranking loss for regression-ish problems. I couldn’t find any writeups on torch’s MarginRegressionLoss function outside of the context of contrastive embeddings, so I wrote my own:

Posting here in the hopes it helps someone out.


1 Like

Thanks for sharing the post! :slight_smile: