Skip to content

Instantly share code, notes, and snippets.

@sriharsha0806
Created December 13, 2017 10:18
Show Gist options
  • Save sriharsha0806/551f6b72e308c68e72517031eb5c9069 to your computer and use it in GitHub Desktop.
Save sriharsha0806/551f6b72e308c68e72517031eb5c9069 to your computer and use it in GitHub Desktop.
name: "VGG_ILSVRC_16_layer"
layer {
name: "data"
type: "DenseImageData"
top: "data"
top: "label"
dense_image_data_param {
source: "/SegNet/CamVid/test.txt" # Change this to the absolute path to your data file
batch_size: 4 # Change this to be the number of Monte Carlo Dropout samples you wish to make
}
}
layer {
bottom: "data"
top: "conv1_1"
name: "conv1_1"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 64
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv1_1"
top: "conv1_1"
name: "conv1_1_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv1_1"
top: "conv1_1"
name: "relu1_1"
type: "ReLU"
}
layer {
bottom: "conv1_1"
top: "conv1_2"
name: "conv1_2"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 64
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv1_2"
top: "conv1_2"
name: "conv1_2_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv1_2"
top: "conv1_2"
name: "relu1_2"
type: "ReLU"
}
layer {
bottom: "conv1_2"
top: "pool1"
top: "pool1_mask"
name: "pool1"
type: "Pooling"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
bottom: "pool1"
top: "conv2_1"
name: "conv2_1"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 128
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv2_1"
top: "conv2_1"
name: "conv2_1_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv2_1"
top: "conv2_1"
name: "relu2_1"
type: "ReLU"
}
layer {
bottom: "conv2_1"
top: "conv2_2"
name: "conv2_2"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 128
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv2_2"
top: "conv2_2"
name: "conv2_2_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv2_2"
top: "conv2_2"
name: "relu2_2"
type: "ReLU"
}
layer {
bottom: "conv2_2"
top: "pool2"
top: "pool2_mask"
name: "pool2"
type: "Pooling"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
bottom: "pool2"
top: "conv3_1"
name: "conv3_1"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 256
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv3_1"
top: "conv3_1"
name: "conv3_1_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv3_1"
top: "conv3_1"
name: "relu3_1"
type: "ReLU"
}
layer {
bottom: "conv3_1"
top: "conv3_2"
name: "conv3_2"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 256
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv3_2"
top: "conv3_2"
name: "conv3_2_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv3_2"
top: "conv3_2"
name: "relu3_2"
type: "ReLU"
}
layer {
bottom: "conv3_2"
top: "conv3_3"
name: "conv3_3"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 256
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv3_3"
top: "conv3_3"
name: "conv3_3_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv3_3"
top: "conv3_3"
name: "relu3_3"
type: "ReLU"
}
layer {
bottom: "conv3_3"
top: "pool3"
top: "pool3_mask"
name: "pool3"
type: "Pooling"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "encdrop3"
type: "Dropout"
bottom: "pool3"
top: "pool3"
dropout_param {
dropout_ratio: 0.5
sample_weights_test: true
}
}
layer {
bottom: "pool3"
top: "conv4_1"
name: "conv4_1"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 512
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv4_1"
top: "conv4_1"
name: "conv4_1_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv4_1"
top: "conv4_1"
name: "relu4_1"
type: "ReLU"
}
layer {
bottom: "conv4_1"
top: "conv4_2"
name: "conv4_2"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 512
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv4_2"
top: "conv4_2"
name: "conv4_2_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv4_2"
top: "conv4_2"
name: "relu4_2"
type: "ReLU"
}
layer {
bottom: "conv4_2"
top: "conv4_3"
name: "conv4_3"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 512
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv4_3"
top: "conv4_3"
name: "conv4_3_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv4_3"
top: "conv4_3"
name: "relu4_3"
type: "ReLU"
}
layer {
bottom: "conv4_3"
top: "pool4"
top: "pool4_mask"
name: "pool4"
type: "Pooling"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "encdrop4"
type: "Dropout"
bottom: "pool4"
top: "pool4"
dropout_param {
dropout_ratio: 0.5
sample_weights_test: true
}
}
layer {
bottom: "pool4"
top: "conv5_1"
name: "conv5_1"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 512
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv5_1"
top: "conv5_1"
name: "conv5_1_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv5_1"
top: "conv5_1"
name: "relu5_1"
type: "ReLU"
}
layer {
bottom: "conv5_1"
top: "conv5_2"
name: "conv5_2"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 512
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv5_2"
top: "conv5_2"
name: "conv5_2_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv5_2"
top: "conv5_2"
name: "relu5_2"
type: "ReLU"
}
layer {
bottom: "conv5_2"
top: "conv5_3"
name: "conv5_3"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 512
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv5_3"
top: "conv5_3"
name: "conv5_3_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv5_3"
top: "conv5_3"
name: "relu5_3"
type: "ReLU"
}
layer {
bottom: "conv5_3"
top: "pool5"
top: "pool5_mask"
name: "pool5"
type: "Pooling"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "encdrop5"
type: "Dropout"
bottom: "pool5"
top: "pool5"
dropout_param {
dropout_ratio: 0.5
sample_weights_test: true
}
}
layer {
name: "upsample5"
type: "Upsample"
bottom: "pool5"
top: "pool5_D"
bottom: "pool5_mask"
upsample_param {
scale: 2
upsample_w: 30
upsample_h: 23
}
}
layer {
bottom: "pool5_D"
top: "conv5_3_D"
name: "conv5_3_D"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 512
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv5_3_D"
top: "conv5_3_D"
name: "conv5_3_D_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv5_3_D"
top: "conv5_3_D"
name: "relu5_3_D"
type: "ReLU"
}
layer {
bottom: "conv5_3_D"
top: "conv5_2_D"
name: "conv5_2_D"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 512
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv5_2_D"
top: "conv5_2_D"
name: "conv5_2_D_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv5_2_D"
top: "conv5_2_D"
name: "relu5_2_D"
type: "ReLU"
}
layer {
bottom: "conv5_2_D"
top: "conv5_1_D"
name: "conv5_1_D"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 512
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv5_1_D"
top: "conv5_1_D"
name: "conv5_1_D_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv5_1_D"
top: "conv5_1_D"
name: "relu5_1_D"
type: "ReLU"
}
layer {
name: "decdrop5"
type: "Dropout"
bottom: "conv5_1_D"
top: "conv5_1_D"
dropout_param {
dropout_ratio: 0.5
sample_weights_test: true
}
}
layer {
name: "upsample4"
type: "Upsample"
bottom: "conv5_1_D"
top: "pool4_D"
bottom: "pool4_mask"
upsample_param {
scale: 2
upsample_w: 60
upsample_h: 45
}
}
layer {
bottom: "pool4_D"
top: "conv4_3_D"
name: "conv4_3_D"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 512
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv4_3_D"
top: "conv4_3_D"
name: "conv4_3_D_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv4_3_D"
top: "conv4_3_D"
name: "relu4_3_D"
type: "ReLU"
}
layer {
bottom: "conv4_3_D"
top: "conv4_2_D"
name: "conv4_2_D"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 512
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv4_2_D"
top: "conv4_2_D"
name: "conv4_2_D_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv4_2_D"
top: "conv4_2_D"
name: "relu4_2_D"
type: "ReLU"
}
layer {
bottom: "conv4_2_D"
top: "conv4_1_D"
name: "conv4_1_D"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 256
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv4_1_D"
top: "conv4_1_D"
name: "conv4_1_D_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv4_1_D"
top: "conv4_1_D"
name: "relu4_1_D"
type: "ReLU"
}
layer {
name: "decdrop4"
type: "Dropout"
bottom: "conv4_1_D"
top: "conv4_1_D"
dropout_param {
dropout_ratio: 0.5
sample_weights_test: true
}
}
layer {
name: "upsample3"
type: "Upsample"
bottom: "conv4_1_D"
top: "pool3_D"
bottom: "pool3_mask"
upsample_param {
scale: 2
}
}
layer {
bottom: "pool3_D"
top: "conv3_3_D"
name: "conv3_3_D"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 256
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv3_3_D"
top: "conv3_3_D"
name: "conv3_3_D_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv3_3_D"
top: "conv3_3_D"
name: "relu3_3_D"
type: "ReLU"
}
layer {
bottom: "conv3_3_D"
top: "conv3_2_D"
name: "conv3_2_D"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 256
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv3_2_D"
top: "conv3_2_D"
name: "conv3_2_D_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv3_2_D"
top: "conv3_2_D"
name: "relu3_2_D"
type: "ReLU"
}
layer {
bottom: "conv3_2_D"
top: "conv3_1_D"
name: "conv3_1_D"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 128
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv3_1_D"
top: "conv3_1_D"
name: "conv3_1_D_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv3_1_D"
top: "conv3_1_D"
name: "relu3_1_D"
type: "ReLU"
}
layer {
name: "decdrop3"
type: "Dropout"
bottom: "conv3_1_D"
top: "conv3_1_D"
dropout_param {
dropout_ratio: 0.5
sample_weights_test: true
}
}
layer {
name: "upsample2"
type: "Upsample"
bottom: "conv3_1_D"
top: "pool2_D"
bottom: "pool2_mask"
upsample_param {
scale: 2
}
}
layer {
bottom: "pool2_D"
top: "conv2_2_D"
name: "conv2_2_D"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 128
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv2_2_D"
top: "conv2_2_D"
name: "conv2_2_D_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv2_2_D"
top: "conv2_2_D"
name: "relu2_2_D"
type: "ReLU"
}
layer {
bottom: "conv2_2_D"
top: "conv2_1_D"
name: "conv2_1_D"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 64
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv2_1_D"
top: "conv2_1_D"
name: "conv2_1_D_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv2_1_D"
top: "conv2_1_D"
name: "relu2_1_D"
type: "ReLU"
}
layer {
name: "upsample1"
type: "Upsample"
bottom: "conv2_1_D"
top: "pool1_D"
bottom: "pool1_mask"
upsample_param {
scale: 2
}
}
layer {
bottom: "pool1_D"
top: "conv1_2_D"
name: "conv1_2_D"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 64
pad: 1
kernel_size: 3
}
}
layer {
bottom: "conv1_2_D"
top: "conv1_2_D"
name: "conv1_2_D_bn"
type: "BN"
bn_param {
bn_mode: INFERENCE
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0.001
}
}
}
layer {
bottom: "conv1_2_D"
top: "conv1_2_D"
name: "relu1_2_D"
type: "ReLU"
}
layer {
bottom: "conv1_2_D"
top: "conv1_1_D"
name: "conv1_1_D"
type: "Convolution"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
num_output: 11
pad: 1
kernel_size: 3
}
}
layer {
name: "prob"
type: "Softmax"
bottom: "conv1_1_D"
top: "prob"
softmax_param {engine: CAFFE}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment