Comments (6)
What is your final loss value for m=4? Without knowing your settings, my best guess is that the m=4 loss have not been properly optimized. If your lambda is close to 0 (when the optimization is over) and the m=4 loss is reasonably low, it is highly unlikely the performance will go down.
from largemargin_softmax_loss.
My settings is as follows:
################## train ##################
layer {
name: "ip2"
type: "LargeMarginInnerProduct"
bottom: "bn_ip"
bottom: "label"
top: "ip2"
top: "lambda"
param {
name: "ip2"
lr_mult: 1
}
largemargin_inner_product_param {
num_output: 4
#type: SINGLE
#base: 0
type: QUADRUPLE
base: 900
gamma: 0.0000055
power: 40
iteration: 0
lambda_min: 0
weight_filler {
type: "msra"
}
}
include {
phase: TRAIN
}
}
################# test ##################
layer {
name: "ip2"
type: "LargeMarginInnerProduct"
bottom: "bn_ip"
bottom: "label"
top: "ip2"
top: "lambda"
param {
name: "ip2"
lr_mult: 0
}
largemargin_inner_product_param {
num_output: 4
type:SINGLE
base: 0
gamma: 0.0000055
power: 40
iteration: 0
lambda_min: 0
weight_filler {
type: "msra"
}
}
include {
phase: TEST
}
}
layer {
name: "accuracy"
type: "Accuracy"
bottom: "ip2"
bottom: "label"
top: "accuracy"
include {
phase: TEST
}
}
layer {
name: "loss"
type: "SoftmaxWithLoss"
bottom: "ip2"
bottom: "label"
top: "loss"
}
The lambda is 0.9726 when the optimization.
from largemargin_softmax_loss.
It seems your dataset is quite easy, since you can achieve quite good results with m=1. The final lambda is actually too high for such easy dataset. You should consider increase the parameter power or change the gamma a little bit, or even increase the iteration number in order to make lambda decrease more rapidly. I think the final lambda should be nearly 0, say below 10^-5, to achieve the best results.
from largemargin_softmax_loss.
When the lambda decrease rapidly, the network diverges. How can I fix it?
from largemargin_softmax_loss.
You should change gamma to a a smaller value, or set a small lambda_min.
from largemargin_softmax_loss.
BTW, I just fix a bug about lambda_min. You should use the new version
from largemargin_softmax_loss.
Related Issues (20)
- hard to convergence HOT 4
- About A-Softmax HOT 21
- some typos in HOT 2
- Licensing HOT 3
- trian_accuracy decrease? HOT 1
- Computation of k value from eq. (6) HOT 2
- the deploy.prototxt of LargeMargin_Softmax_Loss HOT 5
- Check failed: target_blobs.size() == source_layer.blobs_size() (1 vs. 2) HOT 2
- Activation function problem HOT 1
- Pairs of testing
- Why `lambda = max(lambda_min,base*(1+gamma*iteration)^(-power)`? Any particular reason?
- Can I know which part of the paper do sign_x_ correspond to?
- void LargeMarginInnerProductLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom,
- train accuracy decrease HOT 1
- train mnist,loss is nan
- evaluate LargeMargin_Softmax_Loss on lfw
- L-softmax + center loss HOT 1
- L
- Angle margin
- Is the CIFAR10 dataset error rate given in the paper the result of a single model?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from largemargin_softmax_loss.