Large margin softmax loss in pytroch

Does anyone know where to find the pytorch version of large margin softmax loss? I search for it where I can find but don’t make it.

And I only find MultiLabelSoftMarginLoss.

Pytorch doesn’t have an implementation of large margin softmax loss, and a quick google search doesn’t seem to result in anything. You can be the first person to write one :smiley:

Here’s the code if you have not found it yet : lsoftmax-pytorch. The truth, you should kinda update it to 0.4.0, but works fine.

Thanks for your effort.

Here’s an updated implementation: