Skip to content

Instantly share code, notes, and snippets.

@zqigolden
Created February 27, 2020 11:24
Show Gist options
  • Save zqigolden/90a019e261be5a58b906d98992bb7365 to your computer and use it in GitHub Desktop.
Save zqigolden/90a019e261be5a58b906d98992bb7365 to your computer and use it in GitHub Desktop.
[binary classfication prototxt] #caffe
name: "quality_mobile_branch"
input: "blob1"
input_dim: 1
input_dim: 3
input_dim: 96
input_dim: 96
layer {
name: "conv1"
type: "Convolution"
bottom: "blob1"
top: "conv_blob1"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 16
bias_term: true
pad: 1
kernel_size: 3
group: 1
stride: 2
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
dilation: 1
}
}
layer {
name: "relu1"
type: "ReLU"
bottom: "conv_blob1"
top: "relu_blob1"
}
layer {
name: "conv2"
type: "Convolution"
bottom: "relu_blob1"
top: "conv_blob2"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 32
bias_term: true
pad: 1
kernel_size: 3
group: 1
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
dilation: 1
}
}
layer {
name: "relu2"
type: "ReLU"
bottom: "conv_blob2"
top: "relu_blob2"
}
layer {
name: "conv3"
type: "Convolution"
bottom: "relu_blob2"
top: "conv_blob3"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 24
bias_term: true
pad: 1
kernel_size: 3
group: 1
stride: 2
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
dilation: 1
}
}
layer {
name: "relu3"
type: "ReLU"
bottom: "conv_blob3"
top: "relu_blob3"
}
layer {
name: "conv4"
type: "Convolution"
bottom: "relu_blob3"
top: "conv_blob4"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 48
bias_term: true
pad: 1
kernel_size: 3
group: 1
stride: 2
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
dilation: 1
}
}
layer {
name: "relu4"
type: "ReLU"
bottom: "conv_blob4"
top: "relu_blob4"
}
layer {
name: "conv5"
type: "Convolution"
bottom: "relu_blob4"
top: "conv_blob5"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 32
bias_term: true
pad: 1
kernel_size: 3
group: 1
stride: 2
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
dilation: 1
}
}
layer {
name: "relu5"
type: "ReLU"
bottom: "conv_blob5"
top: "relu_blob5"
}
layer {
name: "conv6"
type: "Convolution"
bottom: "relu_blob5"
top: "conv_blob6"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 24
bias_term: true
pad: 1
kernel_size: 3
group: 1
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
dilation: 1
}
}
layer {
name: "relu6"
type: "ReLU"
bottom: "conv_blob6"
top: "relu_blob6"
}
layer {
name: "conv7"
type: "Convolution"
bottom: "relu_blob6"
top: "conv_blob7"
param {
lr_mult: 1.0
decay_mult: 1.0
}
param {
lr_mult: 2.0
decay_mult: 0.0
}
convolution_param {
num_output: 16
bias_term: true
pad: 0
kernel_size: 1
group: 1
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
value: 0.0
}
dilation: 1
}
}
layer {
name: "relu7"
type: "ReLU"
bottom: "conv_blob7"
top: "relu_blob7"
}
layer {
name: "view1"
type: "Reshape"
bottom: "relu_blob7"
top: "view_blob1"
reshape_param {
shape {
dim: 0
dim: -1
}
}
}
layer {
name: "fc1"
type: "InnerProduct"
bottom: "view_blob1"
top: "fc_blob1"
inner_product_param {
num_output: 2
bias_term: true
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "quality_prob"
type: "Softmax"
bottom: "fc_blob1"
top: "quality_prob"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment