Skip to content

Commit

Permalink
local change
Browse files Browse the repository at this point in the history
  • Loading branch information
shyhuai committed Jul 28, 2017
1 parent a13fb1b commit dea21c4
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 42 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ multigpu-trained
*-b*.prototxt
*tmp*
*Models*
*.caffemodel
*.solverstate

12 changes: 6 additions & 6 deletions configs/test.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
flag: testdpBenchmark #Flag of current experiment
tools: mxnet #Tools to benchmark
tools: cntk #Tools to benchmark
experiments: #<network type>; <network name>; <device id>; <device count>; <batch size>; <number of epochs>; <epoch size>; <Learning rate>
{
fc; fcn5; 0; 1; 4096; 2; 60000; 0.05
Expand All @@ -8,19 +8,19 @@ experiments: #<network type>; <network name>; <device id>; <device count>; <ba
# fc; fcn5; 0; 1; 1024; 2; 60000; 0.05
# fc; fcn5; 0; 1; 512; 2; 60000; 0.05
# fc; fcn5; 0; 1; 342; 2; 60000; 0.05
cnn; alexnet; 0; 1; 1024; 2; 50000; 0.01
cnn; alexnet; -1; 20; 1024; 2; 50000; 0.01
# cnn; alexnet; 0; 1; 1024; 2; 50000; 0.01
# cnn; alexnet; -1; 20; 1024; 2; 50000; 0.01
# cnn; alexnet; 0; 1; 512; 2; 50000; 0.01
# cnn; alexnet; 0; 1; 256; 2; 50000; 0.01
# cnn; alexnet; 0; 1; 128; 2; 50000; 0.01
# cnn; alexnet; 0; 1; 86; 2; 50000; 0.01
cnn; resnet; 0; 1; 128; 2; 50000; 0.01
cnn; resnet; -1; 20; 128; 2; 50000; 0.01
# cnn; resnet; 0; 1; 128; 2; 50000; 0.01
# cnn; resnet; -1; 20; 128; 2; 50000; 0.01
# cnn; resnet; 0; 1; 64; 2; 50000; 0.01
# cnn; resnet; 0; 1; 32; 2; 50000; 0.01
# cnn; resnet; 0; 1; 16; 2; 50000; 0.01
# cnn; resnet; 0; 1; 11; 2; 50000; 0.01
rnn; lstm; 0; 1; 1024; 2; -1; 0.01
# rnn; lstm; 0; 1; 1024; 2; -1; 0.01
# rnn; lstm; 0; 1; 512; 2; -1; 0.01
# rnn; lstm; 0; 1; 256; 2; -1; 0.01
# rnn; lstm; 0; 1; 128; 2; -1; 0.01
Expand Down
37 changes: 19 additions & 18 deletions tools/caffe/cnn/alexnet/alexnet_imagenet.prototxt
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ layer {
}
data_param {
source: "/home/datasets/imagenet/caffe/ilsvrc12_val_lmdb"
batch_size: 200
batch_size: 50
backend: LMDB
}
}

layer {
name: "conv1"
type: "Convolution"
Expand Down Expand Up @@ -218,14 +219,14 @@ layer {
num_output: 384
pad: 1
kernel_size: 3
#group: 2
group: 2
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
value: 1
value: 0.1
}
}
}
Expand Down Expand Up @@ -259,7 +260,7 @@ layer {
}
bias_filler {
type: "constant"
value: 0
value: 0.1
}
}
}
Expand Down Expand Up @@ -301,16 +302,16 @@ layer {
}
bias_filler {
type: "constant"
value: 1
value: 0.1
}
}
}
#layer {
# name: "relu6"
# type: "ReLU"
# bottom: "fc6"
# top: "fc6"
#}
layer {
name: "relu6"
type: "ReLU"
bottom: "fc6"
top: "fc6"
}
layer {
name: "drop6"
type: "Dropout"
Expand Down Expand Up @@ -341,16 +342,16 @@ layer {
}
bias_filler {
type: "constant"
value: 1
value: 0.1
}
}
}
#layer {
# name: "relu7"
# type: "ReLU"
# bottom: "fc7"
# top: "fc7"
#}
layer {
name: "relu7"
type: "ReLU"
bottom: "fc7"
top: "fc7"
}
layer {
name: "drop7"
type: "Dropout"
Expand Down
26 changes: 13 additions & 13 deletions tools/caffe/cnn/alexnet/solver.prototxt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# The train/test net protocol buffer definition
net: "alexnet-bBATCHSIZE.prototxt"
base_lr: 0.001

lr_policy: "fixed"
max_iter: MAXITER
display: 1
solver_mode: DEVICE
net: "train_val.prototxt"
test_iter: 1000
test_interval: 1000
base_lr: 0.01
lr_policy: "step"
gamma: 0.1
stepsize: 100000
display: 20
max_iter: 450000
momentum: 0.9

# covering the full 10,000 testing images.
test_iter: 100
# Carry out testing every 2 training epochs.
test_interval: TESTINTERVAL
weight_decay: 0.0005
snapshot: 10000
snapshot_prefix: "caffe_alexnet_train"
solver_mode: GPU
4 changes: 2 additions & 2 deletions tools/caffe/cnn/alexnet/solver_imagenet.prototxt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
net: "alexnet_imagenet.prototxt"
test_iter: 250
test_interval: 5000
test_iter: 1000
test_interval: 1000
base_lr: 0.01
lr_policy: "step"
gamma: 0.1
Expand Down
4 changes: 2 additions & 2 deletions tools/cntk/cnn/alexnet/alexnet_imagenet.cntk
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ Train = {
ParallelTrain = {
parallelizationMethod = "DataParallelSGD"
distributedMBReading = "true"
parallelizationStartEpoch = 3
parallelizationStartEpoch = 1
DataParallelSGD = {
gradientBits = 4
gradientBits = 1
}
}

Expand Down
2 changes: 1 addition & 1 deletion tools/cntk/cnn/alexnet/testimagenet.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
mpirun -np 16 -machinefile cluster16 cntk configFile=alexnet_imagenet2.cntk deviceId=auto minibatchSize=256 maxEpochs=40 parallelTrain=true command=Train
#mpirun -np 16 -machinefile cluster16 cntk configFile=alexnet_imagenet2.cntk deviceId=auto minibatchSize=256 maxEpochs=40 parallelTrain=true command=Train
#cntk configFile=alexnet_imagenet2.cntk deviceId=auto minibatchSize=256 command=Test

0 comments on commit dea21c4

Please sign in to comment.