Created
March 31, 2016 14:18
-
-
Save mrgloom/9e2deed16e775a4fea9da118b4b60ab1 to your computer and use it in GitHub Desktop.
segnet_simple_train.prototxt
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: "segnet" | |
layer { | |
name: "data" | |
type: "DenseImageData" | |
top: "data" | |
top: "label" | |
dense_image_data_param { | |
source: "/SegNet/CamVid/train.txt" # Change this to the absolute path to your data file | |
batch_size: 4 # Change this number to a batch size that will fit on your GPU | |
shuffle: true | |
} | |
} | |
layer { | |
name: "norm" | |
type: "LRN" | |
bottom: "data" | |
top: "norm" | |
lrn_param { | |
local_size: 5 | |
alpha: 0.0001 | |
beta: 0.75 | |
} | |
} | |
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
layer { | |
name: "conv1" | |
type: "Convolution" | |
bottom: "norm" | |
top: "conv1" | |
param { | |
lr_mult: 1 | |
decay_mult: 1 | |
} | |
param { | |
lr_mult: 2 | |
decay_mult: 0 | |
} | |
convolution_param { | |
num_output: 64 | |
kernel_size: 7 | |
pad: 3 | |
weight_filler { | |
type: "msra" | |
} | |
bias_filler { | |
type: "constant" | |
} | |
} | |
} | |
layer { | |
bottom: "conv1" | |
top: "conv1" | |
name: "conv1_bn" | |
type: "BN" | |
bn_param { | |
scale_filler { | |
type: "constant" | |
value: 1 | |
} | |
shift_filler { | |
type: "constant" | |
value: 0.001 | |
} | |
} | |
} | |
layer { | |
name: "relu1" | |
type: "ReLU" | |
bottom: "conv1" | |
top: "conv1" | |
} | |
layer { | |
name: "pool1" | |
type: "Pooling" | |
bottom: "conv1" | |
top: "pool1" | |
top: "pool1_mask" | |
pooling_param { | |
pool: MAX | |
kernel_size: 2 | |
stride: 2 | |
} | |
} | |
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
// After this step doing upsampling | |
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
layer { | |
name: "upsample1" | |
type: "Upsample" | |
bottom: "pool1" | |
bottom: "pool1_mask" | |
top: "upsample1" | |
upsample_param { | |
scale: 2 | |
//pad_out_h: true | |
} | |
} | |
layer { | |
name: "conv_decode1" | |
type: "Convolution" | |
bottom: "upsample1" | |
top: "conv_decode1" | |
param { | |
lr_mult: 1 | |
decay_mult: 1 | |
} | |
param { | |
lr_mult: 2 | |
decay_mult: 0 | |
} | |
convolution_param { | |
num_output: 64 | |
kernel_size: 7 | |
pad: 3 | |
weight_filler { | |
type: "msra" | |
} | |
bias_filler { | |
type: "constant" | |
} | |
} | |
} | |
layer { | |
bottom: "conv_decode1" | |
top: "conv_decode1" | |
name: "conv_decode1_bn" | |
type: "BN" | |
bn_param { | |
scale_filler { | |
type: "constant" | |
value: 1 | |
} | |
shift_filler { | |
type: "constant" | |
value: 0.001 | |
} | |
} | |
} | |
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
layer { | |
name: "conv_classifier" | |
type: "Convolution" | |
bottom: "conv_decode1" | |
top: "conv_classifier" | |
param { | |
lr_mult: 1 | |
decay_mult: 1 | |
} | |
param { | |
lr_mult: 2 | |
decay_mult: 0 | |
} | |
convolution_param { | |
num_output: 11 | |
kernel_size: 1 | |
weight_filler { | |
type: "msra" | |
} | |
bias_filler { | |
type: "constant" | |
} | |
} | |
} | |
layer { | |
name: "loss" | |
type: "SoftmaxWithLoss" | |
bottom: "conv_classifier" | |
bottom: "label" | |
top: "loss" | |
softmax_param {engine: CAFFE} | |
loss_param: { | |
weight_by_label_freqs: true | |
ignore_label: 11 | |
class_weighting: 0.2595 | |
class_weighting: 0.1826 | |
class_weighting: 4.5640 | |
class_weighting: 0.1417 | |
class_weighting: 0.9051 | |
class_weighting: 0.3826 | |
class_weighting: 9.6446 | |
class_weighting: 1.8418 | |
class_weighting: 0.6823 | |
class_weighting: 6.2478 | |
class_weighting: 7.3614 | |
} | |
} | |
layer { | |
name: "accuracy" | |
type: "Accuracy" | |
bottom: "conv_classifier" | |
bottom: "label" | |
top: "accuracy" | |
top: "per_class_accuracy" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment