solver.prototxt:
net: "models/bvlc_reference_caffenet/train_val.prototxt" # 指定的需要训练的网络模型
test_iter: 1000 # 在测试的时候,需要迭代的次数,即test_iter* batchsize(测试集的)=测试集的大小,测试集的 batchsize可以在prototx文件里设置
test_interval: 1000 # 训练的时候,每迭代test_interval次就进行一次测试。
base_lr: 0.01 # 开始的学习率,α = 0.01=1e-2
lr_policy: "step" # 学习策略: 每 stepsize 次迭代之后,将 α 乘以 gamma
gamma: 0.1 # 学习速率变化因子
stepsize: 100000 # 每100000次迭代,就降低一次学习速率
display: 20 # 每迭代20次,显示一次
max_iter: 450000 # 训练的最大迭代次数450000
momentum: 0.9 # 动量 momentum 为:μ = 0.9,μ 使 weight 的更新更为平缓,使SGD学习过程更为稳定、快速。更容易跳出局部最优,加速收敛。
weight_decay: 0.0005 # 权值衰减项,可看作正则化的系数,增大它的值可以减少过拟合,使在损失值相同的情况下,学习算法更倾向于选择权值和更小的网络.sgd时候的参数
snapshot: 10000 # 每迭代snapshot次,保存一次快照(参数数据)
snapshot_prefix: "models/bvlc_reference_caffenet/caffenet_train" #设置快照存储路径
solver_mode: GPU # 使用的模式是GPU
# 动量为:μ
# Vt+1 = μVt − α∇L(Wt)
# Wt+1 = Wt + Vt+1
# lr_policy可选择的策略:
"fixed"
"inv"
"step"
"multistep"
"stepearly"
"poly"
# The learning rate decay policy. The currently implemented learning rate policies are as follows:
# - fixed: always return base_lr.
# - step: return base_lr * gamma ^ (floor(iter / step))
# - exp: return base_lr * gamma ^ iter
# - inv: return base_lr * (1 + gamma * iter) ^ (- power)
# - multistep: similar to step but it allows non uniform steps defined by
# stepvalue
# - poly: the effective learning rate follows a polynomial decay, to be
# zero by the max_iter. return base_lr (1 - iter/max_iter) ^ (power)
# - sigmoid: the effective learning rate follows a sigmod decay
# return base_lr ( 1/(1 + exp(-gamma * (iter - stepsize))))
#
# where base_lr, max_iter, gamma, step, stepvalue and power are defined
# in the solver parameter protocol buffer, and iter is the current iteration.
caffe学习笔记10-solver.prototxt学习
最新推荐文章于 2019-08-29 19:23:30 发布