(original) (raw)

name : "Context-Encoder-AlexNet-pool5" # This model, has alexnet layers only till pool5. For # using it as pretraining for other tasks , we initialize # the last two FC layers randomly and then finetune the complete # alexnet network. input: "data" input_dim: 10 input_dim: 3 input_dim: 227 input_dim: 227 # ==== Network Definition Starts ========== layer { name: "conv1" type: "Convolution" bottom: "data" top: "Convolution1" param { lr_mult: 1 decay_mult: 1 } param { lr_mult: 2 decay_mult: 0 } convolution_param { engine: CAFFE num_output: 96 pad: 0 kernel_size: 11 group: 1 stride: 4 } } layer { name: "relu1" type: "ReLU" bottom: "Convolution1" top: "Convolution1" relu_param { negative_slope: 0 } } layer { name: "Pooling1" type: "Pooling" bottom: "Convolution1" top: "Pooling1" pooling_param { pool: MAX kernel_size: 3 stride: 2 pad: 0 } } layer { name: "LRN1" type: "LRN" bottom: "Pooling1" top: "LRN1" lrn_param { local_size: 5 alpha: 0.0001 beta: 0.75 } } layer { name: "conv2" type: "Convolution" bottom: "LRN1" top: "Convolution2" param { lr_mult: 1 decay_mult: 1 } param { lr_mult: 2 decay_mult: 0 } convolution_param { engine: CAFFE num_output: 256 pad: 2 kernel_size: 5 group: 2 stride: 1 } } layer { name: "relu2" type: "ReLU" bottom: "Convolution2" top: "Convolution2" relu_param { negative_slope: 0 } } layer { name: "Pooling2" type: "Pooling" bottom: "Convolution2" top: "Pooling2" pooling_param { pool: MAX kernel_size: 3 stride: 2 pad: 0 } } layer { name: "LRN2" type: "LRN" bottom: "Pooling2" top: "LRN2" lrn_param { local_size: 5 alpha: 0.0001 beta: 0.75 } } layer { name: "conv3" type: "Convolution" bottom: "LRN2" top: "Convolution3" param { lr_mult: 1 decay_mult: 1 } param { lr_mult: 2 decay_mult: 0 } convolution_param { engine: CAFFE num_output: 384 pad: 1 kernel_size: 3 group: 1 stride: 1 } } layer { name: "relu3" type: "ReLU" bottom: "Convolution3" top: "Convolution3" relu_param { negative_slope: 0 } } layer { name: "conv4" type: "Convolution" bottom: "Convolution3" top: "Convolution4" param { lr_mult: 1 decay_mult: 1 } param { lr_mult: 2 decay_mult: 0 } convolution_param { engine: CAFFE num_output: 384 pad: 1 kernel_size: 3 group: 2 stride: 1 } } layer { name: "relu4" type: "ReLU" bottom: "Convolution4" top: "Convolution4" relu_param { negative_slope: 0 } } layer { name: "conv5" type: "Convolution" bottom: "Convolution4" top: "Convolution5" param { lr_mult: 1 decay_mult: 1 } param { lr_mult: 2 decay_mult: 0 } convolution_param { engine: CAFFE num_output: 256 pad: 1 kernel_size: 3 group: 2 stride: 1 } } layer { name: "relu5" type: "ReLU" bottom: "Convolution5" top: "Convolution5" relu_param { negative_slope: 0 } } # ==== Network Definition Until Conv5 ========== layer { name: "pool5" type: "Pooling" bottom: "Convolution5" top: "Pooling3" pooling_param { pool: MAX kernel_size: 3 stride: 2 } } # ==== Network Definition FC Layers ========== # Note the pretrained caffemodel doesn't contain FC layers. # So here I am just mentioning FC layers for completeness. # They are initialized using Gaussian weight filler of Caffe # as shown below. layer { name: "fc6_new" type: "InnerProduct" bottom: "Pooling3" top: "fc6" param { lr_mult: 1 decay_mult: 1 } param { lr_mult: 2 decay_mult: 0 } inner_product_param { num_output: 4096 weight_filler { type: "gaussian" std: 0.01 } bias_filler { type: "constant" value: 0 } } } layer { name: "relu6" type: "ReLU" bottom: "fc6" top: "fc6" } layer { name: "drop6" type: "Dropout" bottom: "fc6" top: "fc6" dropout_param { dropout_ratio: 0.5 } } layer { name: "fc7_new" type: "InnerProduct" bottom: "fc6" top: "fc7" param { lr_mult: 1 decay_mult: 1 } param { lr_mult: 2 decay_mult: 0 } inner_product_param { num_output: 4096 weight_filler { type: "gaussian" std: 0.01 } bias_filler { type: "constant" value: 0 } } } layer { name: "relu7" type: "ReLU" bottom: "fc7" top: "fc7" } layer { name: "drop7" type: "Dropout" bottom: "fc7" top: "fc7" dropout_param { dropout_ratio: 0.5 } }