【问题标题】:solver.prototxt for adam solver in caffecaffe 中亚当求解器的solver.prototxt
【发布时间】:2017-04-21 22:09:18
【问题描述】:
我使用 adam 的solver.prototxt 如下。我需要添加或删除任何条款吗?损失似乎没有减少
net: "/home/softwares/caffe-master/examples/hpm/hp.prototxt"
test_iter: 6
test_interval: 1000
base_lr: 0.001
momentum: 0.9
momentum2: 0.999
delta: 0.00000001
lr_policy: "fixed"
regularization_type: "L2"
stepsize: 2000
display: 100
max_iter: 20000
snapshot: 1000
snapshot_prefix: "/home/softwares/caffe-master/examples/hpm/hp"
type: "Adam"
solver_mode: GPU
【问题讨论】:
标签:
caffe
solver
gradient-descent
【解决方案1】:
【讨论】:
-
-
是的,我同意。一个建议是更改“base_lr”。也许另一个问题是相关的:link.
【解决方案2】:
你的工作怎么样?如果你使用亚当。我建议你看一下caffe中的设置。我不知道你为什么有 L2 和 delta 值。 This 是标准设置
# The train/test net protocol buffer definition
# this follows "ADAM: A METHOD FOR STOCHASTIC OPTIMIZATION"
net: "examples/mnist/lenet_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: 100
# Carry out testing every 500 training iterations.
test_interval: 500
# All parameters are from the cited paper above
base_lr: 0.001
momentum: 0.9
momentum2: 0.999
# since Adam dynamically changes the learning rate, we set the base learning
# rate to a fixed value
lr_policy: "fixed"
# Display every 100 iterations
display: 100
# The maximum number of iterations
max_iter: 10000
# snapshot intermediate results
snapshot: 5000
snapshot_prefix: "examples/mnist/lenet"
# solver mode: CPU or GPU
type: "Adam"
solver_mode: GPU
【解决方案3】:
尝试使用 0.1 的学习率和更慢的步长(如 300)并观察行为,同时检查 lmdb/hdf5 文件是否格式正确并具有正确的比例以简化学习,您可以通过生成数据集上的平均文件。