Skip to content

Instantly share code, notes, and snippets.

@MousaZeidBaker
Last active July 11, 2017 08:38
Show Gist options
  • Save MousaZeidBaker/cd8c9384b25916a37c55167f8af7a982 to your computer and use it in GitHub Desktop.
Save MousaZeidBaker/cd8c9384b25916a37c55167f8af7a982 to your computer and use it in GitHub Desktop.
name: "conv_dropout"
layer {
name: "mnist"
type: "Data"
top: "data"
top: "label"
include {
phase: TRAIN
}
transform_param {
scale: 0.00390625
}
data_param {
source: "code/mnist_train_lmdb"
batch_size: 64
backend: LMDB
}
}
layer {
name: "mnist"
type: "Data"
top: "data"
top: "label"
include {
phase: TEST
}
transform_param {
scale: 0.00390625
}
data_param {
source: "code/mnist_test_lmdb"
batch_size: 100
backend: LMDB
}
}
layer {
name: "conv1"
type: "Convolution"
bottom: "data"
top: "conv1"
param {
lr_mult: 1
}
param {
lr_mult: 2
}
convolution_param {
num_output: 6
kernel_size: 6
stride: 1 #Output 28x28 x6
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu1"
type: "ReLU"
bottom: "conv1"
top: "conv1"
}
layer {
name: "conv2"
type: "Convolution"
bottom: "conv1"
top: "conv2"
param {
lr_mult: 1
}
param {
lr_mult: 2
}
convolution_param {
num_output: 12
kernel_size: 5 #Output 14x14 x12
stride: 2
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu2"
type: "ReLU"
bottom: "conv2"
top: "conv2"
}
layer {
name: "conv3"
type: "Convolution"
bottom: "conv2"
top: "conv3"
param {
lr_mult: 1
}
param {
lr_mult: 2
}
convolution_param {
num_output: 24
kernel_size: 4 #Output 7x7 x24
stride: 2
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu3"
type: "ReLU"
bottom: "conv3"
top: "conv3"
}
layer {
name: "reshape"
type: "Reshape"
bottom: "conv3"
top: "output"
reshape_param {
shape {
dim: -1
dim: 7
dim: 7
dim: 24
}
}
}
layer {
name: "ip1"
type: "InnerProduct"
bottom: "output"
top: "ip1"
param {
lr_mult: 1
}
param {
lr_mult: 2
}
inner_product_param {
num_output: 200
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu4"
type: "ReLU"
bottom: "ip1"
top: "ip1"
}
layer {
name: "dropout"
type: "Dropout"
bottom: "ip1"
top: "dp1"
param {
dropout_param: 0.75
}
}
layer {
name: "accuracy"
type: "Accuracy"
bottom: "dp1"
bottom: "label"
top: "accuracy"
include {
phase: TEST
}
}
layer {
name: "loss"
type: "SoftmaxWithLoss"
bottom: "dp1"
bottom: "label"
top: "loss"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment