Skip to content

Instantly share code, notes, and snippets.

@OAkyildiz
Created April 26, 2019 17:01
Show Gist options
  • Save OAkyildiz/5f9d88f9cd8a03e72dd585a7cfa245af to your computer and use it in GitHub Desktop.
Save OAkyildiz/5f9d88f9cd8a03e72dd585a7cfa245af to your computer and use it in GitHub Desktop.
PorotoTxt file for the DSN model
name: "CaffeNet"
layers {
layer {
name: "data"
type: "data"
source: "cifar10_gcn-leveldb/cifar-train-leveldb"
batchsize: 100
}
top: "data"
top: "label"
}
layers {
layer {
name: "conv1"
type: "conv"
num_output: 192
kernelsize: 5
pad: 2
weight_filler {
type: "gaussian"
std: 0.05
#type: "xavier"
}
bias_filler {
type: "constant"
value: 0.
}
blobs_lr: 1.
blobs_lr: 2.
weight_decay: 1.
weight_decay: 0.
}
bottom: "data"
top: "conv1"
}
layers {
layer {
name: "split1"
type: "split"
}
bottom: "conv1"
top: "conv1_split0"
top: "conv1_split1"
}
layers {
layer {
name: "ip_svm1"
type: "innerproduct"
num_output: 10
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
blobs_lr_policy: "power_inv"
blobs_lr_policy: "power_inv"
blobs_lr: 0.001
blobs_lr: 0.002
weight_decay: 1.
weight_decay: 0.
}
bottom: "conv1_split1"
top: "ip_svm1"
}
layers {
layer {
name: "loss"
type: "squaredhingeloss"
}
bottom: "ip_svm1"
bottom: "label"
}
layers {
layer {
name: "relu1"
type: "relu"
}
bottom: "conv1_split0"
top: "conv1_split0"
}
layers {
layer {
name: "cccp1"
type: "cccp"
num_output: 160
group: 1
weight_filler {
type: "gaussian"
std: 0.05
#type: "xavier"
}
bias_filler {
type: "constant"
value: 0.
}
blobs_lr: 1.
blobs_lr: 2.
weight_decay: 1.
weight_decay: 0.
}
bottom: "conv1_split0"
top: "cccp1"
}
layers {
layer {
name: "relu_cccp1"
type: "relu"
}
bottom: "cccp1"
top: "cccp1"
}
layers {
layer {
name: "cccp2"
type: "cccp"
num_output: 96
group: 1
weight_filler {
type: "gaussian"
std: 0.05
#type: "xavier"
}
bias_filler {
type: "constant"
value: 0.
}
blobs_lr: 1.
blobs_lr: 2.
weight_decay: 1.
weight_decay: 0.
}
bottom: "cccp1"
top: "cccp2"
}
layers {
layer {
name: "relu_cccp2"
type: "relu"
}
bottom: "cccp2"
top: "cccp2"
}
layers {
layer {
name: "pool1"
type: "pool"
pool: MAX
kernelsize: 3
stride: 2
}
bottom: "cccp2"
top: "pool1"
}
layers {
layer {
name: "drop3"
type: "dropout"
dropout_ratio: 0.5
mean_on_test: true
mean_on_train: false
}
bottom: "pool1"
top: "pool1"
}
layers {
layer {
name: "conv2"
type: "conv"
num_output: 192
kernelsize: 5
pad: 2
weight_filler {
type: "gaussian"
std: 0.05
#type: "xavier"
}
bias_filler {
type: "constant"
value: 0.
}
blobs_lr: 1.
blobs_lr: 2.
weight_decay: 1.
weight_decay: 0.
}
bottom: "pool1"
top: "conv2"
}
layers {
layer {
name: "split2"
type: "split"
}
bottom: "conv2"
top: "conv2_split0"
top: "conv2_split1"
}
layers {
layer {
name: "ip_svm2"
type: "innerproduct"
num_output: 10
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
blobs_lr_policy: "power_inv"
blobs_lr_policy: "power_inv"
blobs_lr: 0.001
blobs_lr: 0.002
weight_decay: 1
weight_decay: 0.
}
bottom: "conv2_split1"
top: "ip_svm2"
}
layers {
layer {
name: "loss"
type: "squaredhingeloss"
}
bottom: "ip_svm2"
bottom: "label"
}
layers {
layer {
name: "relu2"
type: "relu"
}
bottom: "conv2_split0"
top: "conv2_split0"
}
layers {
layer {
name: "cccp3"
type: "cccp"
num_output: 192
group: 1
weight_filler {
type: "gaussian"
std: 0.05
#type: "xavier"
}
bias_filler {
type: "constant"
value: 0.
}
blobs_lr: 1.
blobs_lr: 2.
weight_decay: 1.
weight_decay: 0.
}
bottom: "conv2_split0"
top: "cccp3"
}
layers {
layer {
name: "relu_cccp3"
type: "relu"
}
bottom: "cccp3"
top: "cccp3"
}
layers {
layer {
name: "cccp4"
type: "cccp"
num_output: 192
group: 1
weight_filler {
type: "gaussian"
std: 0.05
#type: "xavier"
}
bias_filler {
type: "constant"
value: 0.
}
blobs_lr: 1.
blobs_lr: 2.
weight_decay: 1.
weight_decay: 0.
}
bottom: "cccp3"
top: "cccp4"
}
layers {
layer {
name: "relu_cccp4"
type: "relu"
}
bottom: "cccp4"
top: "cccp4"
}
layers {
layer {
name: "pool2"
type: "pool"
pool: MAX
kernelsize: 3
stride: 2
}
bottom: "cccp4"
top: "pool2"
}
layers {
layer {
name: "drop6"
type: "dropout"
dropout_ratio: 0.5
mean_on_test: true
mean_on_train: false
}
bottom: "pool2"
top: "pool2"
}
layers {
layer {
name: "conv3"
type: "conv"
num_output: 192
kernelsize: 3
pad: 1
weight_filler {
type: "gaussian"
std: 0.05
#type: "xavier"
}
bias_filler {
type: "constant"
value: 0.
}
blobs_lr: 1.
blobs_lr: 2.
weight_decay: 1.
weight_decay: 0.
}
bottom: "pool2"
top: "conv3"
}
layers {
layer {
name: "split3"
type: "split"
}
bottom: "conv3"
top: "conv3_split0"
top: "conv3_split1"
}
layers {
layer {
name: "ip_svm3"
type: "innerproduct"
num_output: 10
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
blobs_lr_policy: "power_inv"
blobs_lr_policy: "power_inv"
blobs_lr: 0.001
blobs_lr: 0.002
weight_decay: 1.
weight_decay: 0.
}
bottom: "conv3_split1"
top: "ip_svm3"
}
layers {
layer {
name: "loss"
type: "squaredhingeloss"
}
bottom: "ip_svm3"
bottom: "label"
}
layers {
layer {
name: "relu3"
type: "relu"
}
bottom: "conv3_split0"
top: "conv3_split0"
}
layers {
layer {
name: "cccp5"
type: "cccp"
num_output: 192
group: 1
weight_filler {
type: "gaussian"
std: 0.05
#type: "xavier"
}
bias_filler {
type: "constant"
value: 0.
}
blobs_lr: 1.
blobs_lr: 2.
weight_decay: 1.
weight_decay: 0.
}
bottom: "conv3_split0"
top: "cccp5"
}
layers {
layer {
name: "relu_cccp5"
type: "relu"
}
bottom: "cccp5"
top: "cccp5"
}
layers {
layer {
name: "cccp6"
type: "cccp"
num_output: 10
group: 1
weight_filler {
type: "gaussian"
std: 0.05
#type: "xavier"
}
bias_filler {
type: "constant"
value: 0.
}
blobs_lr: 0.1
blobs_lr: 0.2
weight_decay: 1.
weight_decay: 0.
}
bottom: "cccp5"
top: "cccp6"
}
#layers {
# layer {
# name: "relu_cccp6"
# type: "relu"
# }
# bottom: "cccp6"
# top: "cccp6"
#}
layers {
layer {
name: "pool3"
type: "pool"
pool: AVE
stride: 1
kernelsize: 8
}
bottom: "cccp6"
top: "pool3"
}
#layers {
# layer {
# name: "ip1"
# type: "innerproduct"
# num_output: 10
# weight_filler {
# type: "xavier"
# #value: 0
# #type: "gaussian"
# #std: 0.2
# }
# bias_filler {
# type: "xavier"
# #type: "constant"
# #value: 0.5
# }
# blobs_lr: 1
# blobs_lr: 2
# weight_decay: 1
# weight_decay: 0
# }
# bottom: "cccp6"
# top: "ip1"
#}
layers {
layer {
name: "loss"
type: "squaredhingeloss"
}
bottom: "pool3"
bottom: "label"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment