Last active
July 7, 2016 19:13
-
-
Save dywangshsf/b58fdc9d704d98a283c5d97ec674e461 to your computer and use it in GitHub Desktop.
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: "CAE" | |
layers { | |
name: "data" | |
type: IMAGEDATA | |
top: "data" | |
top: "label" | |
image_data_param { | |
root_folder: "/data/dywang/Database/MITOS/2012/A/data/train_patches/" | |
source: "/data/dywang/Database/MITOS/2012/A/data/train_patches/train_patches_100/stage01/imagelist_wlabel_tr.txt" | |
batch_size: 32 | |
shuffle: true | |
} | |
transform_param { | |
scale: 0.003921 | |
mean_value: 104.008 | |
mean_value: 116.669 | |
mean_value: 122.675 | |
mirror: true | |
} | |
include: { phase: TRAIN } | |
} | |
layers { | |
name: "data" | |
type: IMAGEDATA | |
top: "data" | |
top: "label" | |
image_data_param { | |
root_folder: "/data/dywang/Database/MITOS/2012/A/data/train_patches/" | |
source: "/data/dywang/Database/MITOS/2012/A/data/train_patches/train_patches_100/stage01/imagelist_wlabel_te.txt" | |
batch_size: 32 | |
shuffle: true | |
} | |
transform_param { | |
scale: 0.003921 | |
mean_value: 104.008 | |
mean_value: 116.669 | |
mean_value: 122.675 | |
mirror: true | |
} | |
include: { phase: TEST } | |
} | |
# conv1_1 : 64x64 -> 62x62 | |
layers { bottom: "data" top: "conv1_1" name: "conv1_1" type: CONVOLUTION | |
blobs_lr: 1 blobs_lr: 2 weight_decay: 1 weight_decay: 0 | |
convolution_param { num_output: 12 pad: 0 kernel_size: 3 }} | |
layers { bottom: 'conv1_1' top: 'conv1_1' name: 'bn1_1' type: BN | |
bn_param { scale_filler { type: 'constant' value: 1 } | |
shift_filler { type: 'constant' value: 0.001 } | |
bn_mode: INFERENCE } } | |
layers { bottom: "conv1_1" top: "conv1_1" name: "relu1_1" type: RELU} | |
# conv1_2 : 62x62 -> 60x60 | |
layers { bottom: "conv1_1" top: "conv1_2" name: "conv1_2" type: CONVOLUTION | |
blobs_lr: 1 blobs_lr: 2 weight_decay: 1 weight_decay: 0 | |
convolution_param { num_output: 12 pad: 0 kernel_size: 3 }} | |
layers { bottom: 'conv1_2' top: 'conv1_2' name: 'bn1_2' type: BN | |
bn_param { scale_filler { type: 'constant' value: 1 } | |
shift_filler { type: 'constant' value: 0.001 } | |
bn_mode: INFERENCE } } | |
layers { bottom: "conv1_2" top: "conv1_2" name: "relu1_2" type: RELU} | |
# pool1: : 60x60 -> 30x30 | |
layers { | |
bottom: "conv1_2" top: "pool1" top:"pool1_mask" name: "pool1" type: POOLING | |
pooling_param { pool: MAX kernel_size: 2 stride: 2 } | |
} | |
# conv2_1 : 30x30 -> 28x28 | |
layers { bottom: "pool1" top: "conv2_1" name: "conv2_1" type: CONVOLUTION | |
blobs_lr: 1 blobs_lr: 2 weight_decay: 1 weight_decay: 0 | |
convolution_param { num_output: 24 pad: 0 kernel_size: 3 }} | |
layers { bottom: 'conv2_1' top: 'conv2_1' name: 'bn2_1' type: BN | |
bn_param { scale_filler { type: 'constant' value: 1 } | |
shift_filler { type: 'constant' value: 0.001 } | |
bn_mode: INFERENCE } } | |
layers { bottom: "conv2_1" top: "conv2_1" name: "relu2_1" type: RELU} | |
# pool2: : 28x28 -> 14x14 | |
layers { | |
bottom: "conv2_1" top: "pool2" top:"pool2_mask" name: "pool2" type: POOLING | |
pooling_param { pool: MAX kernel_size: 2 stride: 2 } | |
} | |
#### | |
# 7 x 7 | |
# fc1 | |
layers { bottom: 'pool2' top: 'fc1' name: 'fc1' type: CONVOLUTION | |
blobs_lr: 1 blobs_lr: 2 weight_decay: 1 weight_decay: 0 | |
convolution_param { kernel_size: 14 num_output: 1024 } } | |
layers { bottom: 'fc1' top: 'fc1' name: 'bnfc1' type: BN | |
bn_param { scale_filler { type: 'constant' value: 1 } | |
shift_filler { type: 'constant' value: 0.001 } | |
bn_mode: INFERENCE } } | |
layers { bottom: "fc1" top: "fc1" name: "relu1" type: RELU} | |
# 1 x 1 | |
# fc2 | |
layers { bottom: 'fc1' top: 'fc2' name: 'fc2' type: CONVOLUTION | |
blobs_lr: 1 blobs_lr: 2 weight_decay: 1 weight_decay: 0 | |
convolution_param { kernel_size: 1 num_output: 1024 } } | |
layers { bottom: 'fc2' top: 'fc2' name: 'bnfc2' type: BN | |
bn_param { scale_filler { type: 'constant' value: 1 } | |
shift_filler { type: 'constant' value: 0.001 } | |
bn_mode: INFERENCE } } | |
layers { bottom: "fc2" top: "fc2" name: "relu2" type: RELU} | |
# fc1-deconv : 1x1 -> 14x14 | |
layers { bottom: 'fc2' top: 'fc1-deconv' name: 'fc1-deconv' type: DECONVOLUTION | |
blobs_lr: 1 blobs_lr: 2 weight_decay: 1 weight_decay: 0 | |
convolution_param { num_output: 24 kernel_size: 14 | |
weight_filler { type: "gaussian" std: 0.01 } | |
bias_filler { type: "constant" value: 0 }} } | |
layers { bottom: 'fc1-deconv' top: 'fc1-deconv' name: 'fc1-deconv-bn' type: BN | |
bn_param { scale_filler { type: 'constant' value: 1 } | |
shift_filler { type: 'constant' value: 0.001 } | |
bn_mode: INFERENCE } } | |
layers { bottom: 'fc1-deconv' top: 'fc1-deconv' name: 'fc1-deconv-relu' type: RELU } | |
# 7 x 7 | |
# unpool2 : 14x14 -> 28 x 28 | |
layers { type: UNPOOLING bottom: "fc1-deconv" bottom: "pool2_mask" top: "unpool2" name: "unpool2" | |
unpooling_param { unpool: MAX kernel_size: 2 stride: 2 unpool_size: 28 } | |
} | |
# 14 x 14 | |
# deconv2_1 : 28x28 -> 30x30 | |
layers { bottom: 'unpool2' top: 'deconv2_1' name: 'deconv2_1' type: DECONVOLUTION | |
blobs_lr: 1 blobs_lr: 2 weight_decay: 1 weight_decay: 0 | |
convolution_param { num_output: 12 pad: 1 kernel_size: 3 | |
weight_filler { type: "gaussian" std: 0.01 } | |
bias_filler { type: "constant" value: 0 }} } | |
layers { bottom: 'deconv2_1' top: 'deconv2_1' name: 'debn2_1' type: BN | |
bn_param { scale_filler { type: 'constant' value: 1 } | |
shift_filler { type: 'constant' value: 0.001 } | |
bn_mode: INFERENCE } } | |
layers { bottom: 'deconv2_1' top: 'deconv2_1' name: 'derelu2_1' type: RELU } | |
# 7 x 7 | |
# unpool1 : 30x30 -> 60 x 60 | |
layers { type: UNPOOLING bottom: "deconv2_1" bottom: "pool1_mask" top: "unpool1" name: "unpool1" | |
unpooling_param { unpool: MAX kernel_size: 2 stride: 2 unpool_size: 60 } | |
} | |
# 14 x 14 | |
# deconv1_2 : 60x60 -> 62x62 | |
layers { bottom: 'unpool1' top: 'deconv1_2' name: 'deconv1_2' type: DECONVOLUTION | |
blobs_lr: 1 blobs_lr: 2 weight_decay: 1 weight_decay: 0 | |
convolution_param { num_output: 12 pad: 1 kernel_size: 3 | |
weight_filler { type: "gaussian" std: 0.01 } | |
bias_filler { type: "constant" value: 0 }} } | |
layers { bottom: 'deconv1_2' top: 'deconv1_2' name: 'debn1_2' type: BN | |
bn_param { scale_filler { type: 'constant' value: 1 } | |
shift_filler { type: 'constant' value: 0.001 } | |
bn_mode: INFERENCE } } | |
layers { bottom: 'deconv1_2' top: 'deconv1_2' name: 'derelu1_2' type: RELU } | |
# deconv1_1 : 62x62 -> 64x64 | |
layers { name: 're-image' type: CONVOLUTION bottom: 'deconv1_2' top: 're-image' | |
blobs_lr: 1 blobs_lr: 2 weight_decay: 1 weight_decay: 0 | |
convolution_param { num_output: 3 kernel_size: 1 | |
weight_filler { type: "gaussian" std: 0.01 } | |
bias_filler { type: "constant" value: 0 }} } | |
## | |
layers { | |
name: "loss" | |
type: SIGMOID_CROSS_ENTROPY_LOSS | |
bottom: "re-image" | |
bottom: "data" | |
top: "cross_entropy_error" | |
loss_weight: 1 | |
} | |
layers { | |
name: "loss" | |
type: EUCLIDEAN_LOSS | |
bottom: "re-image" | |
bottom: "data" | |
top: "l2_error" | |
loss_weight: 0 | |
} | |
layers { | |
name: "layers-sigmod" | |
type: SIGMOID | |
bottom: "label" | |
top: "label-sig" | |
} | |
layers { | |
name: "loss-fake" | |
type: EUCLIDEAN_LOSS | |
bottom: "label" | |
bottom: "label-sig" | |
top: "l2_error-fake" | |
loss_weight: 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment