blob: 41d6b6fdb5d5a98ed715cad6b9d8ca22525f24e8 [file] [log] [blame]
name: "mlp"
train_steps: 1000
test_steps:10
test_freq:60
disp_freq:10
train_one_batch {
alg: kBP
}
updater{
type: kSGD
learning_rate{
type : kStep
base_lr: 0.001
step_conf{
change_freq: 60
gamma: 0.997
}
}
}
neuralnet {
layer {
name: "data"
type: kRecordInput
store_conf {
backend: "kvfile"
path: "examples/mnist/train_data.bin"
random_skip: 5000
batchsize: 64
shape: 784
std_value: 127.5
mean_value: 127.5
}
include: kTrain
}
layer {
name: "data"
type: kRecordInput
store_conf {
backend: "kvfile"
path: "examples/mnist/test_data.bin"
batchsize: 100
shape: 784
std_value: 127.5
mean_value: 127.5
}
include: kTest
}
layer{
name: "fc1"
type: kInnerProduct
srclayers:"data"
innerproduct_conf{
num_output: 2500
}
param{
name: "w1"
init {
type: kUniform
low:-0.05
high:0.05
}
}
param{
name: "b1"
init {
type : kUniform
low: -0.05
high:0.05
}
}
}
layer{
name: "tanh1"
type: kSTanh
srclayers:"fc1"
}
layer{
name: "fc2"
type: kInnerProduct
srclayers:"tanh1"
innerproduct_conf{
num_output: 2000
}
param{
name: "w2"
init {
type: kUniform
low:-0.05
high:0.05
}
}
param{
name: "b2"
init {
type: kUniform
low: -0.05
high:0.05
}
}
}
layer{
name: "tanh2"
type: kSTanh
srclayers:"fc2"
}
layer{
name: "fc3"
type: kInnerProduct
srclayers:"tanh2"
innerproduct_conf{
num_output: 1500
}
param{
name: "w3"
init{
type: kUniform
low:-0.05
high:0.05
}
}
param{
name: "b3"
init {
type : kUniform
low: -0.05
high:0.05
}
}
}
layer{
name: "tanh3"
type: kSTanh
srclayers:"fc3"
}
layer{
name: "fc4"
type: kInnerProduct
srclayers:"tanh3"
innerproduct_conf{
num_output: 1000
}
param{
name: "w4"
init {
type : kUniform
low:-0.05
high:0.05
}
}
param{
name: "b4"
init {
type : kUniform
low: -0.05
high:0.05
}
}
}
layer{
name: "tanh4"
type: kSTanh
srclayers:"fc4"
}
layer{
name: "fc5"
type: kInnerProduct
srclayers:"tanh4"
innerproduct_conf{
num_output: 500
}
param{
name: "w5"
init {
type : kUniform
low:-0.05
high:0.05
}
}
param{
name: "b5"
init {
type : kUniform
low: -0.05
high:0.05
}
}
}
layer{
name: "tanh5"
type: kSTanh
srclayers:"fc5"
}
layer{
name: "fc6"
type: kInnerProduct
srclayers:"tanh5"
innerproduct_conf{
num_output: 10
}
param{
name: "w6"
init {
type : kUniform
low:-0.05
high:0.05
}
}
param{
name: "b6"
init {
type : kUniform
low: -0.05
high:0.05
}
}
}
layer{
name: "loss"
type:kSoftmaxLoss
softmaxloss_conf{
topk:1
}
srclayers:"fc6"
srclayers:"data"
}
}
cluster {
nworker_groups: 1
nserver_groups: 1
workspace: "examples/mnist"
}