Setting the regularization_type for all layers
2014-10-17 14:30
239 查看
Many papers said if using the L2-normalization on features then the performance will improved greatly, so I tried to find approaches to achieve this. In the file caffe.proto, SolverParameter has optional parm named regularization_type, we can switch this
between L1 and L2, two ways can do it: 1) set in solver.protocol file, set regularization_type = L1 or L2 like set stepsize=100000; 2) set it on caffe.proto file, this will change the
default setting of regularization_type if we on longer set this param in solver.protocoll file.
The above setting mainly focus on hidden layers, if we want to use SVM and change its regularization_type, then first we need declare the loss layer is HINGE_LOSS,
SVM tends to benefit from L2 normalization, a possible explanation is that after normalization the inner product corresponds to the cosine similarity.
layers {
name: "loss"
type: HINGE_LOSS
bottom: "ip1"
bottom: "label"
top: "loss"
hinge_loss_param
{
norm = 2# ---> L2
}
}
between L1 and L2, two ways can do it: 1) set in solver.protocol file, set regularization_type = L1 or L2 like set stepsize=100000; 2) set it on caffe.proto file, this will change the
default setting of regularization_type if we on longer set this param in solver.protocoll file.
The above setting mainly focus on hidden layers, if we want to use SVM and change its regularization_type, then first we need declare the loss layer is HINGE_LOSS,
SVM tends to benefit from L2 normalization, a possible explanation is that after normalization the inner product corresponds to the cosine similarity.
layers {
name: "loss"
type: HINGE_LOSS
bottom: "ip1"
bottom: "label"
top: "loss"
hinge_loss_param
{
norm = 2# ---> L2
}
}
相关文章推荐
- Most JDBC drivers require that the JdbcType must be specified for all nullable parameters.
- mybatis JDBC requires that the JdbcType must be specified for all nullable parameters
- The error occurred while setting parameters 错误解析--Bad value for type timestamp : 3
- Siebel Admin: Setting the AOM Parameter for the Webmaster Data Type
- 上海赛区-org.apache.ibatis.type.TypeException: JDBC requires that the JdbcType must be specified for all nullable parameters.
- JDBC requires that the JdbcType must be specified for all nullable parameters.
- TypeException:JDBC requires that the JdbcType must be specified for all nullable parameters.
- JDBC requires that the JdbcType must be specified for all nullable parameters.
- JDBC requires that the JdbcType must be specified for all nullable parameters
- mybatis 异常: JDBC requires that the JdbcType must be specified for all nullable parameters.
- JDBC requires that the JdbcType must be specified for all nullable parameters.
- Siebel Admin: Setting the AOM Parameter for the Webmaster Data Type
- The template file for selected project type is missing的解决
- The type of feed to provide for blog comments
- What is the easiest way of getting OpenLayers to configure itself for printing?
- Could not store transport type data for Receive Location 'Recv.Loc' to config store. Primary SSO Server 'Sql-server' failed. The external credentials in the SSO database are more recent.
- The type of publishing done for this blog.
- The Run-time Type Information library for the Pocket PC 2003 SDK is available
- ArcGIS Engine中初始化许可常见问题归纳,the application is not licensed to create or modify schema for this type of data
- Error creating control: The type initializer for 'Microsoft.Web.Design.ExtenderInformationServiceProvider' threw an exception