caffe的solver方法笔记

来源:互联网 发布:淘宝滑动验证码 编辑:程序博客网 时间:2024/05/21 09:08

以下为solver.prototxt的内容:

# The train/test net protocol buffer definitionnet: "myself/net_train_test.prototxt"# test_iter specifies how many forward passes the test should carry out.# In the case of MNIST, we have test batch size 100 and 100 test iterations,# covering the full 10,000 testing images.这个参数需要根据样本数目计算test_iter: 1000# Carry out testing every 100 training iterations.每迭代100次就对测试集测试一遍test_interval: 100# The base learning rate, momentum and the weight decay of the network.base_lr: 0.001momentum: 0.9weight_decay: 0.0005# The learning rate policylr_policy: "inv"gamma: 0.0001power: 0.75# Display every 100 iterationsdisplay: 10# The maximum number of iterationsmax_iter: 10000# snapshot intermediate resultssnapshot: 1000snapshot_prefix: "myself/net"# solver mode: CPU or GPUsolver_mode: GPU

caffe的训练
caffe支持6种solver方法:
- Stochastic Gradient Descent (type: “SGD”),
- AdaDelta (type: “AdaDelta”),
- Adaptive Gradient (type: “AdaGrad”),
- Adam (type: “Adam”),
- Nesterov’s Accelerated Gradient (type: “Nesterov”)
- RMSprop (type: “RMSProp”)
根据type: SGD来选择采用哪种优化方法,默认采用SGD方法。

原创粉丝点击