optimized solver for cifar10/cifar10_fast

This commit is contained in:
Ubuntu 2019-05-02 18:20:50 +00:00
parent ac1b1b89ca
commit b7de96eeec
8 changed files with 10 additions and 132 deletions

View File

@ -14,11 +14,14 @@ base_lr: 0.001
momentum: 0.9
weight_decay: 0.004
# The learning rate policy
lr_policy: "fixed"
lr_policy: "multistep"
gamma: 0.1
stepvalue: 60000
stepvalue: 65000
# Display every 200 iterations
display: 200
# The maximum number of iterations
max_iter: 60000
max_iter: 70000
# snapshot intermediate results
snapshot: 10000
snapshot_format: HDF5

View File

@ -1,27 +0,0 @@
# reduce learning rate after 120 epochs (60000 iters) by factor 0f 10
# then another factor of 10 after 10 more epochs (5000 iters)
# The train/test net protocol buffer definition
net: "models/cifar10/cifar10_train_test.prototxt"
# test_iter specifies how many forward passes the test should carry out.
# In the case of CIFAR10, we have test batch size 100 and 100 test iterations,
# covering the full 10,000 testing images.
test_iter: 100
# Carry out testing every 1000 training iterations.
test_interval: 1000
# The base learning rate, momentum and the weight decay of the network.
base_lr: 0.0001
momentum: 0.9
weight_decay: 0.004
# The learning rate policy
lr_policy: "fixed"
# Display every 200 iterations
display: 200
# The maximum number of iterations
max_iter: 65000
# snapshot intermediate results
snapshot: 5000
snapshot_format: HDF5
snapshot_prefix: "models/cifar10/cifar10"
# solver mode: CPU or GPU
solver_mode: GPU

View File

@ -1,27 +0,0 @@
# reduce learning rate after 120 epochs (60000 iters) by factor 0f 10
# then another factor of 10 after 10 more epochs (5000 iters)
# The train/test net protocol buffer definition
net: "models/cifar10/cifar10_train_test.prototxt"
# test_iter specifies how many forward passes the test should carry out.
# In the case of CIFAR10, we have test batch size 100 and 100 test iterations,
# covering the full 10,000 testing images.
test_iter: 100
# Carry out testing every 1000 training iterations.
test_interval: 1000
# The base learning rate, momentum and the weight decay of the network.
base_lr: 0.00001
momentum: 0.9
weight_decay: 0.004
# The learning rate policy
lr_policy: "fixed"
# Display every 200 iterations
display: 200
# The maximum number of iterations
max_iter: 70000
# snapshot intermediate results
snapshot: 5000
snapshot_format: HDF5
snapshot_prefix: "models/cifar10/cifar10"
# solver mode: CPU or GPU
solver_mode: GPU

View File

@ -6,13 +6,3 @@ TOOLS=./caffe/build/tools
$TOOLS/caffe train \
--solver=models/cifar10/cifar10_solver.prototxt $@ 2>&1 | tee $DIR/training.log
# reduce learning rate by factor of 10
$TOOLS/caffe train \
--solver=models/cifar10/cifar10_solver_lr1.prototxt \
--snapshot=models/cifar10/cifar10_iter_60000.solverstate.h5 $@ 2>&1 | tee -a $DIR/training.log
# reduce learning rate by factor of 10
$TOOLS/caffe train \
--solver=models/cifar10/cifar10_solver_lr2.prototxt \
--snapshot=models/cifar10/cifar10_iter_65000.solverstate.h5 $@ 2>&1 | tee -a $DIR/training.log

View File

@ -14,11 +14,14 @@ base_lr: 0.001
momentum: 0.9
weight_decay: 0.004
# The learning rate policy
lr_policy: "fixed"
lr_policy: "multistep"
gamma: 0.1
stepvalue: 60000
stepvalue: 65000
# Display every 200 iterations
display: 200
# The maximum number of iterations
max_iter: 60000
max_iter: 70000
# snapshot intermediate results
snapshot: 10000
snapshot_format: HDF5

View File

@ -1,27 +0,0 @@
# reduce learning rate after 120 epochs (60000 iters) by factor 0f 10
# then another factor of 10 after 10 more epochs (5000 iters)
# The train/test net protocol buffer definition
net: "models/cifar10_fast/cifar10_fast_train_test.prototxt"
# test_iter specifies how many forward passes the test should carry out.
# In the case of CIFAR10, we have test batch size 100 and 100 test iterations,
# covering the full 10,000 testing images.
test_iter: 100
# Carry out testing every 1000 training iterations.
test_interval: 1000
# The base learning rate, momentum and the weight decay of the network.
base_lr: 0.0001
momentum: 0.9
weight_decay: 0.004
# The learning rate policy
lr_policy: "fixed"
# Display every 200 iterations
display: 200
# The maximum number of iterations
max_iter: 65000
# snapshot intermediate results
snapshot: 5000
snapshot_format: HDF5
snapshot_prefix: "models/cifar10_fast/cifar10_fast"
# solver mode: CPU or GPU
solver_mode: GPU

View File

@ -1,27 +0,0 @@
# reduce learning rate after 120 epochs (60000 iters) by factor 0f 10
# then another factor of 10 after 10 more epochs (5000 iters)
# The train/test net protocol buffer definition
net: "models/cifar10_fast/cifar10_fast_train_test.prototxt"
# test_iter specifies how many forward passes the test should carry out.
# In the case of CIFAR10, we have test batch size 100 and 100 test iterations,
# covering the full 10,000 testing images.
test_iter: 100
# Carry out testing every 1000 training iterations.
test_interval: 1000
# The base learning rate, momentum and the weight decay of the network.
base_lr: 0.00001
momentum: 0.9
weight_decay: 0.004
# The learning rate policy
lr_policy: "fixed"
# Display every 200 iterations
display: 200
# The maximum number of iterations
max_iter: 70000
# snapshot intermediate results
snapshot: 5000
snapshot_format: HDF5
snapshot_prefix: "models/cifar10_fast/cifar10_fast"
# solver mode: CPU or GPU
solver_mode: GPU

View File

@ -6,13 +6,3 @@ TOOLS=./caffe/build/tools
$TOOLS/caffe train \
--solver=models/cifar10_fast/cifar10_fast_solver.prototxt $@ 2>&1 | tee $DIR/training.log
# reduce learning rate by factor of 10
$TOOLS/caffe train \
--solver=models/cifar10_fast/cifar10_fast_solver_lr1.prototxt \
--snapshot=models/cifar10_fast/cifar10_fast_iter_60000.solverstate.h5 $@ 2>&1 | tee -a $DIR/training.log
# reduce learning rate by factor of 10
$TOOLS/caffe train \
--solver=models/cifar10_fast/cifar10_fast_solver_lr2.prototxt \
--snapshot=models/cifar10_fast/cifar10_fast_iter_65000.solverstate.h5 $@ 2>&1 | tee -a $DIR/training.log