Skip to content

Instantly share code, notes, and snippets.

@altairmn
Last active July 22, 2016 06:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save altairmn/7312083b0c83a670556637f71bd3c02c to your computer and use it in GitHub Desktop.
Save altairmn/7312083b0c83a670556637f71bd3c02c to your computer and use it in GitHub Desktop.
route layer net.
name: "Route Layer"
layer {
name: "data"
type: "Input"
top: "data"
input_param { shape : { dim : 1 dim : 1 dim : 1}}
}
layer {
name: "selector"
type: "Input"
top: "selector"
input_param { shape : { dim : 1 dim : 1 dim : 1}}
}
layer {
name: "output"
type: "Input"
top: "output"
input_param {shape : { dim : 1 dim : 1 dim : 1}}
}
layer {
name: "route-output"
type: "Route"
bottom: "output"
bottom: "selector"
top: "output-r1"
top: "output-r2"
}
layer {
name: "conv-1"
type: "Convolution"
top: "conv-1"
bottom: "data"
param { lr_mult: 1 }
param { lr_mult: 2 }
convolution_param {
num_output: 1
kernel_size: 1
stride: 1
weight_filler {
type: "constant"
value: 0.25
}
bias_filler {
type: "constant"
value: 0.5
}
}
}
layer {
name: "sigm"
type: "Sigmoid"
bottom: "conv-1"
top: "conv-1"
}
layer {
name: "route"
type: "Route"
bottom: "conv-1"
bottom: "selector"
top: "route-1"
top: "route-2"
}
layer {
name: "conv-2-r1"
type: "Convolution"
bottom: "route-1"
top: "conv-2-r1"
convolution_param {
num_output: 1
kernel_size: 1
stride: 1
weight_filler {
type: "constant"
value: 0.15
}
bias_filler {
type: "constant"
value: 0
}
}
param { lr_mult: 1 }
param { lr_mult: 2 }
}
layer {
name: "conv-2-r2"
type: "Convolution"
bottom: "route-2"
top: "conv-2-r2"
convolution_param {
num_output: 1
kernel_size: 1
stride: 1
weight_filler {
type: "constant"
value: 0.10
}
bias_filler {
type: "constant"
value: 0
}
}
param { lr_mult: 1 }
param { lr_mult: 2 }
}
layer {
name: "loss-1"
type: "EuclideanLoss"
top: "loss-1"
bottom: "conv-2-r1"
bottom: "output-r1"
}
layer {
name: "loss-2"
type: "EuclideanLoss"
top: "loss-2"
bottom: "conv-2-r2"
bottom: "output-r2"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment