Last active
May 30, 2018 03:06
-
-
Save ktl014/f86c5ed05f4a155bffbb814a345e0a5f to your computer and use it in GitHub Desktop.
CaffeNet model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "AlexNet" | |
layer { | |
name: "data" | |
type: "Data" | |
top: "data" | |
top: "label" | |
include { | |
phase: TRAIN | |
} | |
# transform_param { | |
# mirror: true | |
# crop_size: 227 | |
# mean_file: "data/ilsvrc12/imagenet_mean.binaryproto" | |
# } | |
# mean pixel / channel-wise mean instead of mean image | |
transform_param { | |
crop_size: 227 | |
mean_value: 104 | |
mean_value: 117 | |
mean_value: 123 | |
mirror: true | |
} | |
data_param { | |
source: "/data4/plankton_wi17/mpl/source_domain/spcombo/combo_finetune/allv1b-noise100/allv1b-noise100_100-100/code/train.LMDB" | |
batch_size: 256 | |
backend: LMDB | |
} | |
} | |
layer { | |
name: "data" | |
type: "Data" | |
top: "data" | |
top: "label" | |
include { | |
phase: TEST | |
} | |
# transform_param { | |
# mirror: false | |
# crop_size: 227 | |
# mean_file: "data/ilsvrc12/imagenet_mean.binaryproto" | |
# } | |
# mean pixel / channel-wise mean instead of mean image | |
transform_param { | |
crop_size: 227 | |
mean_value: 104 | |
mean_value: 117 | |
mean_value: 123 | |
mirror: true | |
} | |
data_param { | |
source: "/data4/plankton_wi17/mpl/source_domain/spcombo/combo_finetune/allv1b-noise100/allv1b-noise100_100-100/code/val.LMDB" | |
batch_size: 50 | |
backend: LMDB | |
} | |
} | |
layer { | |
name: "conv1" | |
type: "Convolution" | |
bottom: "data" | |
top: "conv1" | |
param { | |
lr_mult: 1 | |
decay_mult: 1 | |
} | |
param { | |
lr_mult: 2 | |
decay_mult: 0 | |
} | |
convolution_param { | |
num_output: 96 | |
kernel_size: 11 | |
stride: 4 | |
weight_filler { | |
type: "gaussian" | |
std: 0.01 | |
} | |
bias_filler { | |
type: "constant" | |
value: 0 | |
} | |
} | |
} | |
layer { | |
name: "relu1" | |
type: "ReLU" | |
bottom: "conv1" | |
top: "conv1" | |
} | |
layer { | |
name: "pool1" | |
type: "Pooling" | |
bottom: "conv1" | |
top: "pool1" | |
pooling_param { | |
pool: MAX | |
kernel_size: 3 | |
stride: 2 | |
} | |
} | |
layer { | |
name: "norm1" | |
type: "LRN" | |
bottom: "pool1" | |
top: "norm1" | |
lrn_param { | |
local_size: 5 | |
alpha: 0.0001 | |
beta: 0.75 | |
} | |
} | |
layer { | |
name: "conv2_a" | |
type: "Convolution" | |
bottom: "norm1" | |
top: "conv2_a" | |
param { | |
lr_mult: 1 | |
decay_mult: 1 | |
} | |
param { | |
lr_mult: 2 | |
decay_mult: 0 | |
} | |
convolution_param { | |
num_output: 256 | |
pad: 2 | |
kernel_size: 5 | |
group: 2 | |
weight_filler { | |
type: "gaussian" | |
std: 0.01 | |
} | |
bias_filler { | |
type: "constant" | |
value: 1 | |
} | |
} | |
} | |
layer { | |
name: "relu2_a" | |
type: "ReLU" | |
bottom: "conv2_a" | |
top: "conv2_a" | |
} | |
layer { | |
name: "pool2_a" | |
type: "Pooling" | |
bottom: "conv2_a" | |
top: "pool2_a" | |
pooling_param { | |
pool: MAX | |
kernel_size: 3 | |
stride: 2 | |
} | |
} | |
layer { | |
name: "norm2_a" | |
type: "LRN" | |
bottom: "pool2_a" | |
top: "norm2_a" | |
lrn_param { | |
local_size: 5 | |
alpha: 0.0001 | |
beta: 0.75 | |
} | |
} | |
layer { | |
name: "conv3_a" | |
type: "Convolution" | |
bottom: "norm2_a" | |
top: "conv3_a" | |
param { | |
lr_mult: 1 | |
decay_mult: 1 | |
} | |
param { | |
lr_mult: 2 | |
decay_mult: 0 | |
} | |
convolution_param { | |
num_output: 384 | |
pad: 1 | |
kernel_size: 3 | |
weight_filler { | |
type: "gaussian" | |
std: 0.01 | |
} | |
bias_filler { | |
type: "constant" | |
value: 0 | |
} | |
} | |
} | |
layer { | |
name: "relu3_a" | |
type: "ReLU" | |
bottom: "conv3_a" | |
top: "conv3_a" | |
} | |
layer { | |
name: "conv4_a" | |
type: "Convolution" | |
bottom: "conv3_a" | |
top: "conv4_a" | |
param { | |
lr_mult: 1 | |
decay_mult: 1 | |
} | |
param { | |
lr_mult: 2 | |
decay_mult: 0 | |
} | |
convolution_param { | |
num_output: 384 | |
pad: 1 | |
kernel_size: 3 | |
group: 2 | |
weight_filler { | |
type: "gaussian" | |
std: 0.01 | |
} | |
bias_filler { | |
type: "constant" | |
value: 1 | |
} | |
} | |
} | |
layer { | |
name: "relu4_a" | |
type: "ReLU" | |
bottom: "conv4_a" | |
top: "conv4_a" | |
} | |
layer { | |
name: "conv5_a" | |
type: "Convolution" | |
bottom: "conv4_a" | |
top: "conv5_a" | |
param { | |
lr_mult: 1 | |
decay_mult: 1 | |
} | |
param { | |
lr_mult: 2 | |
decay_mult: 0 | |
} | |
convolution_param { | |
num_output: 256 | |
pad: 1 | |
kernel_size: 3 | |
group: 2 | |
weight_filler { | |
type: "gaussian" | |
std: 0.01 | |
} | |
bias_filler { | |
type: "constant" | |
value: 1 | |
} | |
} | |
} | |
layer { | |
name: "relu5_a" | |
type: "ReLU" | |
bottom: "conv5_a" | |
top: "conv5_a" | |
} | |
layer { | |
name: "pool5_a" | |
type: "Pooling" | |
bottom: "conv5_a" | |
top: "pool5_a" | |
pooling_param { | |
pool: MAX | |
kernel_size: 3 | |
stride: 2 | |
} | |
} | |
layer { | |
name: "fc6_a" | |
type: "InnerProduct" | |
bottom: "pool5_a" | |
top: "fc6_a" | |
param { | |
lr_mult: 1 | |
decay_mult: 1 | |
} | |
param { | |
lr_mult: 2 | |
decay_mult: 0 | |
} | |
inner_product_param { | |
num_output: 4096 | |
weight_filler { | |
type: "gaussian" | |
std: 0.005 | |
} | |
bias_filler { | |
type: "constant" | |
value: 1 | |
} | |
} | |
} | |
layer { | |
name: "relu6_a" | |
type: "ReLU" | |
bottom: "fc6_a" | |
top: "fc6_a" | |
} | |
layer { | |
name: "drop6_a" | |
type: "Dropout" | |
bottom: "fc6_a" | |
top: "fc6_a" | |
dropout_param { | |
dropout_ratio: 0.5 | |
} | |
} | |
layer { | |
name: "fc7_a" | |
type: "InnerProduct" | |
bottom: "fc6_a" | |
top: "fc7_a" | |
param { | |
lr_mult: 1 | |
decay_mult: 1 | |
} | |
param { | |
lr_mult: 2 | |
decay_mult: 0 | |
} | |
inner_product_param { | |
num_output: 4096 | |
weight_filler { | |
type: "gaussian" | |
std: 0.005 | |
} | |
bias_filler { | |
type: "constant" | |
value: 1 | |
} | |
} | |
} | |
layer { | |
name: "relu7_a" | |
type: "ReLU" | |
bottom: "fc7_a" | |
top: "fc7_a" | |
} | |
layer { | |
name: "drop7_a" | |
type: "Dropout" | |
bottom: "fc7_a" | |
top: "fc7_a" | |
dropout_param { | |
dropout_ratio: 0.5 | |
} | |
} | |
layer { | |
name: "fc8_cayman" | |
type: "InnerProduct" | |
bottom: "fc7_a" | |
top: "fc8_cayman" | |
param { | |
lr_mult: 1 | |
decay_mult: 1 | |
} | |
param { | |
lr_mult: 2 | |
decay_mult: 0 | |
} | |
inner_product_param { | |
num_output: 2 | |
weight_filler { | |
type: "gaussian" | |
std: 0.01 | |
} | |
bias_filler { | |
type: "constant" | |
value: 0 | |
} | |
} | |
} | |
layer { | |
name: "accuracy" | |
type: "Accuracy" | |
bottom: "fc8_cayman" | |
bottom: "label" | |
top: "accuracy" | |
include { | |
phase: TEST | |
} | |
} | |
layer { | |
name: "loss" | |
type: "SoftmaxWithLoss" | |
bottom: "fc8_cayman" | |
bottom: "label" | |
top: "loss" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment