# then another factor of 10 after 10 more epochs (5000 iters)
# The training protocol buffer definition
-train_net: "cifar10_18pct.prototxt"
+train_net: "cifar10_18pct_train.prototxt"
# The testing protocol buffer definition
test_net: "cifar10_18pct_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,
+# 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 500 training iterations.
-test_interval: 500
+# 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.001
momentum: 0.9
weight_decay: 0.004
# The learning rate policy
lr_policy: "fixed"
-# Display every 100 iterations
-display: 100
+# Display every 200 iterations
+display: 200
# The maximum number of iterations
-max_iter: 100000
+max_iter: 60000
# snapshot intermediate results
-snapshot: 5000
+snapshot: 10000
snapshot_prefix: "cifar10_18pct"
# solver mode: 0 for CPU and 1 for GPU
solver_mode: 1
--- /dev/null
+# reduce learning rate after 120 epochs (60000 iters) by factor 0f 10
+# then another factor of 10 after 10 more epochs (5000 iters)
+
+# The training protocol buffer definition
+train_net: "cifar10_18pct_train.prototxt"
+# The testing protocol buffer definition
+test_net: "cifar10_18pct_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_prefix: "cifar10_18pct"
+# solver mode: 0 for CPU and 1 for GPU
+solver_mode: 1
+
+device_id: 0
--- /dev/null
+# reduce learning rate after 120 epochs (60000 iters) by factor 0f 10
+# then another factor of 10 after 10 more epochs (5000 iters)
+
+# The training protocol buffer definition
+train_net: "cifar10_18pct_train.prototxt"
+# The testing protocol buffer definition
+test_net: "cifar10_18pct_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_prefix: "cifar10_18pct"
+# solver mode: 0 for CPU and 1 for GPU
+solver_mode: 1
+
+device_id: 0
layer {\r
name: "cifar"\r
type: "data"\r
- source: "cifar10_db/cifar-test-leveldb"\r
+ source: "cifar10-leveldb/cifar-test-leveldb"\r
meanfile: "mean.binaryproto"\r
batchsize: 100\r
}\r
# ------------------------ layer 1 -----------------------------\r
layers {\r
layer {\r
- name: "pad1"\r
- type: "padding"\r
- pad: 2\r
- }\r
- bottom: "data"\r
- top: "pad1"\r
-}\r
-layers {\r
- layer {\r
name: "conv1"\r
type: "conv"\r
num_output: 32\r
kernelsize: 5\r
+ pad: 2\r
stride: 1\r
weight_filler {\r
type: "gaussian"\r
blobs_lr: 1.\r
blobs_lr: 2.\r
}\r
- bottom: "pad1"\r
+ bottom: "data"\r
top: "conv1"\r
}\r
layers {\r
# --------------------------- layer 2 ------------------------\r
layers {\r
layer {\r
- name: "pad2"\r
- type: "padding"\r
- pad: 2\r
- }\r
- bottom: "norm1"\r
- top: "pad2"\r
-}\r
-layers {\r
- layer {\r
name: "conv2"\r
type: "conv"\r
num_output: 32\r
kernelsize: 5\r
+ pad: 2\r
stride: 1\r
weight_filler {\r
type: "gaussian"\r
blobs_lr: 1.\r
blobs_lr: 2.\r
}\r
- bottom: "pad2"\r
+ bottom: "norm1"\r
top: "conv2"\r
}\r
layers {\r
#-----------------------layer 3-------------------------\r
layers {\r
layer {\r
- name: "pad3"\r
- type: "padding"\r
- pad: 2\r
- }\r
- bottom: "norm2"\r
- top: "pad3"\r
-}\r
-layers {\r
- layer {\r
name: "conv3"\r
type: "conv"\r
num_output: 64\r
kernelsize: 5\r
+ pad: 2\r
stride: 1\r
weight_filler {\r
type: "gaussian"\r
type: "constant"\r
}\r
}\r
- bottom: "pad3"\r
+ bottom: "norm2"\r
top: "conv3"\r
}\r
layers {\r
-name: "CIFAR10_18pct"\r
+name: "CIFAR10_18pct_train"\r
layers {\r
layer {\r
name: "cifar"\r
type: "data"\r
- source: "cifar10_db/cifar-train-leveldb"\r
+ source: "cifar10-leveldb/cifar-train-leveldb"\r
meanfile: "mean.binaryproto"\r
batchsize: 100\r
}\r
# ------------------------ layer 1 -----------------------------\r
layers {\r
layer {\r
- name: "pad1"\r
- type: "padding"\r
- pad: 2\r
- }\r
- bottom: "data"\r
- top: "pad1"\r
-}\r
-layers {\r
- layer {\r
name: "conv1"\r
type: "conv"\r
num_output: 32\r
kernelsize: 5\r
+ pad: 2\r
stride: 1\r
weight_filler {\r
type: "gaussian"\r
blobs_lr: 1.\r
blobs_lr: 2.\r
}\r
- bottom: "pad1"\r
+ bottom: "data"\r
top: "conv1"\r
}\r
layers {\r
# --------------------------- layer 2 ------------------------\r
layers {\r
layer {\r
- name: "pad2"\r
- type: "padding"\r
- pad: 2\r
- }\r
- bottom: "norm1"\r
- top: "pad2"\r
-}\r
-layers {\r
- layer {\r
name: "conv2"\r
type: "conv"\r
num_output: 32\r
kernelsize: 5\r
+ pad: 2\r
stride: 1\r
weight_filler {\r
type: "gaussian"\r
blobs_lr: 1.\r
blobs_lr: 2.\r
}\r
- bottom: "pad2"\r
+ bottom: "norm1"\r
top: "conv2"\r
}\r
layers {\r
#-----------------------layer 3-------------------------\r
layers {\r
layer {\r
- name: "pad3"\r
- type: "padding"\r
- pad: 2\r
- }\r
- bottom: "norm2"\r
- top: "pad3"\r
-}\r
-layers {\r
- layer {\r
name: "conv3"\r
type: "conv"\r
num_output: 64\r
kernelsize: 5\r
+ pad: 2\r
stride: 1\r
weight_filler {\r
type: "gaussian"\r
type: "constant"\r
}\r
}\r
- bottom: "pad3"\r
+ bottom: "norm2"\r
top: "conv3"\r
}\r
layers {\r
# reduce the learning rate after 8 epochs (4000 iters) by a factor of 10
# The training protocol buffer definition
-train_net: "cifar10_80sec.prototxt"
+train_net: "cifar10_80sec_train.prototxt"
# The testing protocol buffer definition
test_net: "cifar10_80sec_test.prototxt"
# test_iter specifies how many forward passes the test should carry out.
# Display every 100 iterations
display: 100
# The maximum number of iterations
-max_iter: 100000
+max_iter: 4000
# snapshot intermediate results
snapshot: 4000
snapshot_prefix: "cifar10_80sec"
--- /dev/null
+# reduce the learning rate after 8 epochs (4000 iters) by a factor of 10
+
+# The training protocol buffer definition
+train_net: "cifar10_80sec_train.prototxt"
+# The testing protocol buffer definition
+test_net: "cifar10_80sec_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
+# 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 100 iterations
+display: 100
+# The maximum number of iterations
+max_iter: 5000
+# snapshot intermediate results
+snapshot: 5000
+snapshot_prefix: "cifar10_80sec"
+# solver mode: 0 for CPU and 1 for GPU
+solver_mode: 1
+
+device_id: 1
-# test 80sec config\r
+# 80sec config\r
name: "CIFAR10_80sec_test"\r
layers {\r
layer {\r
name: "cifar"\r
type: "data"\r
- source: "cifar10_db/cifar-test-leveldb"\r
+ source: "cifar10-leveldb/cifar-test-leveldb"\r
meanfile: "mean.binaryproto"\r
batchsize: 100\r
}\r
# ------------------------ layer 1 -----------------------------\r
layers {\r
layer {\r
- name: "pad1"\r
- type: "padding"\r
- pad: 2\r
- }\r
- bottom: "data"\r
- top: "pad1"\r
-}\r
-layers {\r
- layer {\r
name: "conv1"\r
type: "conv"\r
num_output: 32\r
kernelsize: 5\r
+ pad: 2\r
stride: 1\r
weight_filler {\r
type: "gaussian"\r
blobs_lr: 1.0\r
blobs_lr: 2.0\r
}\r
- bottom: "pad1"\r
+ bottom: "data"\r
top: "conv1"\r
}\r
layers {\r
# --------------------------- layer 2 ------------------------\r
layers {\r
layer {\r
- name: "pad2"\r
- type: "padding"\r
- pad: 2\r
- }\r
- bottom: "pool1"\r
- top: "pad2"\r
-}\r
-layers {\r
- layer {\r
name: "conv2"\r
type: "conv"\r
num_output: 32\r
kernelsize: 5\r
+ pad: 2\r
stride: 1\r
weight_filler {\r
type: "gaussian"\r
blobs_lr: 1.0\r
blobs_lr: 2.0\r
}\r
- bottom: "pad2"\r
+ bottom: "pool1"\r
top: "conv2"\r
}\r
layers {\r
#-----------------------layer 3-------------------------\r
layers {\r
layer {\r
- name: "pad3"\r
- type: "padding"\r
- pad: 2\r
- }\r
- bottom: "pool2"\r
- top: "pad3"\r
-}\r
-layers {\r
- layer {\r
name: "conv3"\r
type: "conv"\r
num_output: 64\r
kernelsize: 5\r
+ pad: 2\r
stride: 1\r
weight_filler {\r
type: "gaussian"\r
blobs_lr: 1.0\r
blobs_lr: 2.0\r
}\r
- bottom: "pad3"\r
+ bottom: "pool2"\r
top: "conv3"\r
}\r
layers {\r
-# test 80sec config\r
-name: "CIFAR10_80sec"\r
+# 80sec config\r
+name: "CIFAR10_80sec_train"\r
layers {\r
layer {\r
name: "cifar"\r
type: "data"\r
- source: "cifar10_db/cifar-train-leveldb"\r
+ source: "cifar10-leveldb/cifar-train-leveldb"\r
meanfile: "mean.binaryproto"\r
batchsize: 100\r
}\r
# ------------------------ layer 1 -----------------------------\r
layers {\r
layer {\r
- name: "pad1"\r
- type: "padding"\r
- pad: 2\r
- }\r
- bottom: "data"\r
- top: "pad1"\r
-}\r
-layers {\r
- layer {\r
name: "conv1"\r
type: "conv"\r
num_output: 32\r
kernelsize: 5\r
+ pad: 2\r
stride: 1\r
weight_filler {\r
type: "gaussian"\r
blobs_lr: 1.0\r
blobs_lr: 2.0\r
}\r
- bottom: "pad1"\r
+ bottom: "data"\r
top: "conv1"\r
}\r
layers {\r
# --------------------------- layer 2 ------------------------\r
layers {\r
layer {\r
- name: "pad2"\r
- type: "padding"\r
- pad: 2\r
- }\r
- bottom: "pool1"\r
- top: "pad2"\r
-}\r
-layers {\r
- layer {\r
name: "conv2"\r
type: "conv"\r
num_output: 32\r
kernelsize: 5\r
+ pad: 2\r
stride: 1\r
weight_filler {\r
type: "gaussian"\r
blobs_lr: 1.0\r
blobs_lr: 2.0\r
}\r
- bottom: "pad2"\r
+ bottom: "pool1"\r
top: "conv2"\r
}\r
layers {\r
#-----------------------layer 3-------------------------\r
layers {\r
layer {\r
- name: "pad3"\r
- type: "padding"\r
- pad: 2\r
- }\r
- bottom: "pool2"\r
- top: "pad3"\r
-}\r
-layers {\r
- layer {\r
name: "conv3"\r
type: "conv"\r
num_output: 64\r
kernelsize: 5\r
+ pad: 2\r
stride: 1\r
weight_filler {\r
type: "gaussian"\r
blobs_lr: 1.0\r
blobs_lr: 2.0\r
}\r
- bottom: "pad3"\r
+ bottom: "pool2"\r
top: "conv3"\r
}\r
layers {\r
--- /dev/null
+#!/usr/bin/env sh
+# This script converts the cifar data into leveldb format.
+
+EXAMPLES=../../build/examples/cifar
+DATA=../../data/cifar10
+TOOLS=../../build/tools
+
+echo "Creating leveldb..."
+
+rm -rf cifar10-leveldb
+mkdir cifar10-leveldb
+
+$EXAMPLES/convert_cifar_data.bin $DATA ./cifar10-leveldb
+
+echo "Computing image mean..."
+
+$TOOLS/compute_image_mean.bin ./cifar10-leveldb/cifar-train-leveldb mean.binaryproto
+
+echo "Done."
--- /dev/null
+#!/usr/bin/env sh
+
+TOOLS=../../build/tools
+
+GLOG_logtostderr=1 $TOOLS/train_net.bin cifar10_18pct_solver.prototxt
+
+#reduce learning rate by factor of 10
+GLOG_logtostderr=1 $TOOLS/train_net.bin cifar10_18pct_solver_lr1.prototxt cifar10_18pct_iter_60000.solverstate
+
+#reduce learning rate by factor of 10
+GLOG_logtostderr=1 $TOOLS/train_net.bin cifar10_18pct_solver_lr2.prototxt cifar10_18pct_iter_65000.solverstate
--- /dev/null
+#!/usr/bin/env sh
+
+TOOLS=../../build/tools
+
+GLOG_logtostderr=1 $TOOLS/train_net.bin cifar10_80sec_solver.prototxt
+
+#reduce learning rate by fctor of 10 after 8 epochs
+GLOG_logtostderr=1 $TOOLS/train_net.bin cifar10_80sec_solver_lr1.prototxt cifar10_80sec_iter_4000.solverstate