Home

Awesome

L-GM-Loss For MXNet/Gluon

My implement of Rethinking Feature Distribution for Loss Functions in Image Classification using MXNet/Gluon

Some Details

Images

I plot the features distribution in my experiment, but as you can see below, there are quit different from the original paper, i will talk about the difference latter.

Removing the regularization term

<img src="image/WithoutRegularTerm/5.png"></img>

i set the $\alpha$ to 0.1, you can see the clear margin between classes, but some classes' distribution are extremely flat which means the variance of those distribution varies a lot in different dimemsions. I guess it's pretty tricky to optimize the variance, yet i dont have a good idea to fix this maybe i should reimplement it using customop that requires to implement the backward by myself, if you have any idea about that please tell me :)

Removing the $\frac{1}{2}log|\Lambda_{z_{i}}|$

<img src="image/WithRegularTerm/5.png"></img>

still suffering from the variance problem :cry:

the author released code is written in caffe and cuda, you can find it in here

Update

By adding a lr_mult term to the variance(set a low learning rate) i fixed the problem, here is the result. <img src="image/fix.png"></img>