打算实现MNIST在各个loss下训练出来的二维特征分布,持续更新
1.为何绘制出的特征分布只在第一象限

在看center loss论文的时候,自己随便构建了一个网络绘制softmax二维特征,但是绘制出的特征分布一直如上图所示,跟论文当中完全不一样。直到我看到Sphereface论文Appendix A,当中说到之所以会出现这种第一象限分布的特征,是因为embedding层加了relu激活,因为relu:max(0,x)会将负数置0。果不其然,去掉relu后就绘制出了如下所示的特征分布。

2. Modified Softmax
相比softmax,Modified Softmax可以让特征之间明确地按角度区分开。

3. Angular Margin Softmax
可以看到,a-softmax不光把特征由角度区分开来,而且更好地控制了特征间的角度距离。即高内聚,低耦合。


网友评论