天天看點

VGG-16 prototxtVGG-16 prototxt

     

VGG-16 prototxt

标簽: CNNcaffe 2016-10-02 14:18 961人閱讀 評論(6) 收藏 舉報 本文章已收錄于:

VGG-16 prototxtVGG-16 prototxt

分類: caffe(15)

VGG-16 prototxtVGG-16 prototxt
VGG-16 prototxtVGG-16 prototxt

作者同類文章 X

CNN(31)

VGG-16 prototxtVGG-16 prototxt
VGG-16 prototxtVGG-16 prototxt

作者同類文章 X

版權聲明:可以參考 亦可轉載 請注明出處

solver.prototxt:

[cpp] view plain copy print ?

VGG-16 prototxtVGG-16 prototxt
VGG-16 prototxtVGG-16 prototxt
  1. net: "models/vgg16/train_val.prototxt"  
  2. test_iter: 1000  
  3. test_interval: 2500  
  4. base_lr: 0.001  
  5. lr_policy: "step"  
  6. gamma: 0.1  
  7. stepsize: 50000  
  8. display: 20  
  9. max_iter: 200000  
  10. momentum: 0.9  
  11. weight_decay: 0.0005  
  12. snapshot: 10000  
  13. snapshot_prefix: "models/vgg16/caffe_vgg16_train"  
  14. solver_mode: GPU  
VGG-16 prototxtVGG-16 prototxt
net: "models/vgg16/train_val.prototxt"
test_iter: 1000
test_interval: 2500
base_lr: 0.001
lr_policy: "step"
gamma: 0.1
stepsize: 50000
display: 20
max_iter: 200000
momentum: 0.9
weight_decay: 0.0005
snapshot: 10000
snapshot_prefix: "models/vgg16/caffe_vgg16_train"
solver_mode: GPU
           

train_val.prototxt: [cpp] view plain copy print ?

VGG-16 prototxtVGG-16 prototxt
VGG-16 prototxtVGG-16 prototxt
  1. name: "VGG16"  
  2. layer {  
  3.   name: "data"  
  4.   type: "Data"  
  5.   top: "data"  
  6.   top: "label"  
  7.   include {  
  8.     phase: TRAIN  
  9.   }  
  10.   # transform_param {  
  11.   #   mirror: true  
  12.   #   crop_size: 224  
  13.   #   mean_file: "data/ilsvrc12_shrt_256/imagenet_mean.binaryproto"  
  14.   # }  
  15.   transform_param {  
  16.     mirror: true  
  17.     crop_size: 224  
  18.     mean_value: 103.939  
  19.     mean_value: 116.779  
  20.     mean_value: 123.68  
  21.   }  
  22.   data_param {  
  23.     source: "data/ilsvrc12_shrt_256/ilsvrc12_train_leveldb"  
  24.     batch_size: 64  
  25.     backend: LEVELDB  
  26.   }  
  27. }  
  28. layer {  
  29.   name: "data"  
  30.   type: "Data"  
  31.   top: "data"  
  32.   top: "label"  
  33.   include {  
  34.     phase: TEST  
  35.   }  
  36.   # transform_param {  
  37.   #   mirror: false  
  38.   #   crop_size: 224  
  39.   #   mean_file: "data/ilsvrc12_shrt_256/imagenet_mean.binaryproto"  
  40.   # }  
  41.   transform_param {  
  42.     mirror: false  
  43.     crop_size: 224  
  44.     mean_value: 103.939  
  45.     mean_value: 116.779  
  46.     mean_value: 123.68  
  47.   }  
  48.   data_param {  
  49.     source: "data/ilsvrc12_shrt_256/ilsvrc12_val_leveldb"  
  50.     batch_size: 50  
  51.     backend: LEVELDB  
  52.   }  
  53. }  
  54. layer {  
  55.   bottom: "data"  
  56.   top: "conv1_1"  
  57.   name: "conv1_1"  
  58.   type: "Convolution"  
  59.   param {  
  60.     lr_mult: 1  
  61.     decay_mult: 1  
  62.   }  
  63.   param {  
  64.     lr_mult: 2  
  65.     decay_mult: 0  
  66.   }  
  67.   convolution_param {  
  68.     num_output: 64  
  69.     pad: 1  
  70.     kernel_size: 3  
  71.     weight_filler {  
  72.       type: "gaussian"  
  73.       std: 0.01  
  74.     }  
  75.     bias_filler {  
  76.       type: "constant"  
  77.       value: 0  
  78.     }  
  79.   }  
  80. }  
  81. layer {  
  82.   bottom: "conv1_1"  
  83.   top: "conv1_1"  
  84.   name: "relu1_1"  
  85.   type: "ReLU"  
  86. }  
  87. layer {  
  88.   bottom: "conv1_1"  
  89.   top: "conv1_2"  
  90.   name: "conv1_2"  
  91.   type: "Convolution"  
  92.   param {  
  93.     lr_mult: 1  
  94.     decay_mult: 1  
  95.   }  
  96.   param {  
  97.     lr_mult: 2  
  98.     decay_mult: 0  
  99.   }  
  100.   convolution_param {  
  101.     num_output: 64  
  102.     pad: 1  
  103.     kernel_size: 3  
  104.     weight_filler {  
  105.       type: "gaussian"  
  106.       std: 0.01  
  107.     }  
  108.     bias_filler {  
  109.       type: "constant"  
  110.       value: 0  
  111.     }  
  112.   }  
  113. }  
  114. layer {  
  115.   bottom: "conv1_2"  
  116.   top: "conv1_2"  
  117.   name: "relu1_2"  
  118.   type: "ReLU"  
  119. }  
  120. layer {  
  121.   bottom: "conv1_2"  
  122.   top: "pool1"  
  123.   name: "pool1"  
  124.   type: "Pooling"  
  125.   pooling_param {  
  126.     pool: MAX  
  127.     kernel_size: 2  
  128.     stride: 2  
  129.   }  
  130. }  
  131. layer {  
  132.   bottom: "pool1"  
  133.   top: "conv2_1"  
  134.   name: "conv2_1"  
  135.   type: "Convolution"  
  136.   param {  
  137.     lr_mult: 1  
  138.     decay_mult: 1  
  139.   }  
  140.   param {  
  141.     lr_mult: 2  
  142.     decay_mult: 0  
  143.   }  
  144.   convolution_param {  
  145.     num_output: 128  
  146.     pad: 1  
  147.     kernel_size: 3  
  148.     weight_filler {  
  149.       type: "gaussian"  
  150.       std: 0.01  
  151.     }  
  152.     bias_filler {  
  153.       type: "constant"  
  154.       value: 0  
  155.     }  
  156.   }  
  157. }  
  158. layer {  
  159.   bottom: "conv2_1"  
  160.   top: "conv2_1"  
  161.   name: "relu2_1"  
  162.   type: "ReLU"  
  163. }  
  164. layer {  
  165.   bottom: "conv2_1"  
  166.   top: "conv2_2"  
  167.   name: "conv2_2"  
  168.   type: "Convolution"  
  169.   param {  
  170.     lr_mult: 1  
  171.     decay_mult: 1  
  172.   }  
  173.   param {  
  174.     lr_mult: 2  
  175.     decay_mult: 0  
  176.   }  
  177.   convolution_param {  
  178.     num_output: 128  
  179.     pad: 1  
  180.     kernel_size: 3  
  181.     weight_filler {  
  182.       type: "gaussian"  
  183.       std: 0.01  
  184.     }  
  185.     bias_filler {  
  186.       type: "constant"  
  187.       value: 0  
  188.     }  
  189.   }  
  190. }  
  191. layer {  
  192.   bottom: "conv2_2"  
  193.   top: "conv2_2"  
  194.   name: "relu2_2"  
  195.   type: "ReLU"  
  196. }  
  197. layer {  
  198.   bottom: "conv2_2"  
  199.   top: "pool2"  
  200.   name: "pool2"  
  201.   type: "Pooling"  
  202.   pooling_param {  
  203.     pool: MAX  
  204.     kernel_size: 2  
  205.     stride: 2  
  206.   }  
  207. }  
  208. layer {  
  209.   bottom: "pool2"  
  210.   top: "conv3_1"  
  211.   name: "conv3_1"  
  212.   type: "Convolution"  
  213.   param {  
  214.     lr_mult: 1  
  215.     decay_mult: 1  
  216.   }  
  217.   param {  
  218.     lr_mult: 2  
  219.     decay_mult: 0  
  220.   }  
  221.   convolution_param {  
  222.     num_output: 256  
  223.     pad: 1  
  224.     kernel_size: 3  
  225.     weight_filler {  
  226.       type: "gaussian"  
  227.       std: 0.01  
  228.     }  
  229.     bias_filler {  
  230.       type: "constant"  
  231.       value: 0  
  232.     }  
  233.   }  
  234. }  
  235. layer {  
  236.   bottom: "conv3_1"  
  237.   top: "conv3_1"  
  238.   name: "relu3_1"  
  239.   type: "ReLU"  
  240. }  
  241. layer {  
  242.   bottom: "conv3_1"  
  243.   top: "conv3_2"  
  244.   name: "conv3_2"  
  245.   type: "Convolution"  
  246.   param {  
  247.     lr_mult: 1  
  248.     decay_mult: 1  
  249.   }  
  250.   param {  
  251.     lr_mult: 2  
  252.     decay_mult: 0  
  253.   }  
  254.   convolution_param {  
  255.     num_output: 256  
  256.     pad: 1  
  257.     kernel_size: 3  
  258.     weight_filler {  
  259.       type: "gaussian"  
  260.       std: 0.01  
  261.     }  
  262.     bias_filler {  
  263.       type: "constant"  
  264.       value: 0  
  265.     }  
  266.   }  
  267. }  
  268. layer {  
  269.   bottom: "conv3_2"  
  270.   top: "conv3_2"  
  271.   name: "relu3_2"  
  272.   type: "ReLU"  
  273. }  
  274. layer {  
  275.   bottom: "conv3_2"  
  276.   top: "conv3_3"  
  277.   name: "conv3_3"  
  278.   type: "Convolution"  
  279.   param {  
  280.     lr_mult: 1  
  281.     decay_mult: 1  
  282.   }  
  283.   param {  
  284.     lr_mult: 2  
  285.     decay_mult: 0  
  286.   }  
  287.   convolution_param {  
  288.     num_output: 256  
  289.     pad: 1  
  290.     kernel_size: 3  
  291.     weight_filler {  
  292.       type: "gaussian"  
  293.       std: 0.01  
  294.     }  
  295.     bias_filler {  
  296.       type: "constant"  
  297.       value: 0  
  298.     }  
  299.   }  
  300. }  
  301. layer {  
  302.   bottom: "conv3_3"  
  303.   top: "conv3_3"  
  304.   name: "relu3_3"  
  305.   type: "ReLU"  
  306. }  
  307. layer {  
  308.   bottom: "conv3_3"  
  309.   top: "pool3"  
  310.   name: "pool3"  
  311.   type: "Pooling"  
  312.   pooling_param {  
  313.     pool: MAX  
  314.     kernel_size: 2  
  315.     stride: 2  
  316.   }  
  317. }  
  318. layer {  
  319.   bottom: "pool3"  
  320.   top: "conv4_1"  
  321.   name: "conv4_1"  
  322.   type: "Convolution"  
  323.   param {  
  324.     lr_mult: 1  
  325.     decay_mult: 1  
  326.   }  
  327.   param {  
  328.     lr_mult: 2  
  329.     decay_mult: 0  
  330.   }  
  331.   convolution_param {  
  332.     num_output: 512  
  333.     pad: 1  
  334.     kernel_size: 3  
  335.     weight_filler {  
  336.       type: "gaussian"  
  337.       std: 0.01  
  338.     }  
  339.     bias_filler {  
  340.       type: "constant"  
  341.       value: 0  
  342.     }  
  343.   }  
  344. }  
  345. layer {  
  346.   bottom: "conv4_1"  
  347.   top: "conv4_1"  
  348.   name: "relu4_1"  
  349.   type: "ReLU"  
  350. }  
  351. layer {  
  352.   bottom: "conv4_1"  
  353.   top: "conv4_2"  
  354.   name: "conv4_2"  
  355.   type: "Convolution"  
  356.   param {  
  357.     lr_mult: 1  
  358.     decay_mult: 1  
  359.   }  
  360.   param {  
  361.     lr_mult: 2  
  362.     decay_mult: 0  
  363.   }  
  364.   convolution_param {  
  365.     num_output: 512  
  366.     pad: 1  
  367.     kernel_size: 3  
  368.     weight_filler {  
  369.       type: "gaussian"  
  370.       std: 0.01  
  371.     }  
  372.     bias_filler {  
  373.       type: "constant"  
  374.       value: 0  
  375.     }  
  376.   }  
  377. }  
  378. layer {  
  379.   bottom: "conv4_2"  
  380.   top: "conv4_2"  
  381.   name: "relu4_2"  
  382.   type: "ReLU"  
  383. }  
  384. layer {  
  385.   bottom: "conv4_2"  
  386.   top: "conv4_3"  
  387.   name: "conv4_3"  
  388.   type: "Convolution"  
  389.   param {  
  390.     lr_mult: 1  
  391.     decay_mult: 1  
  392.   }  
  393.   param {  
  394.     lr_mult: 2  
  395.     decay_mult: 0  
  396.   }  
  397.   convolution_param {  
  398.     num_output: 512  
  399.     pad: 1  
  400.     kernel_size: 3  
  401.     weight_filler {  
  402.       type: "gaussian"  
  403.       std: 0.01  
  404.     }  
  405.     bias_filler {  
  406.       type: "constant"  
  407.       value: 0  
  408.     }  
  409.   }  
  410. }  
  411. layer {  
  412.   bottom: "conv4_3"  
  413.   top: "conv4_3"  
  414.   name: "relu4_3"  
  415.   type: "ReLU"  
  416. }  
  417. layer {  
  418.   bottom: "conv4_3"  
  419.   top: "pool4"  
  420.   name: "pool4"  
  421.   type: "Pooling"  
  422.   pooling_param {  
  423.     pool: MAX  
  424.     kernel_size: 2  
  425.     stride: 2  
  426.   }  
  427. }  
  428. layer {  
  429.   bottom: "pool4"  
  430.   top: "conv5_1"  
  431.   name: "conv5_1"  
  432.   type: "Convolution"  
  433.   param {  
  434.     lr_mult: 1  
  435.     decay_mult: 1  
  436.   }  
  437.   param {  
  438.     lr_mult: 2  
  439.     decay_mult: 0  
  440.   }  
  441.   convolution_param {  
  442.     num_output: 512  
  443.     pad: 1  
  444.     kernel_size: 3  
  445.     weight_filler {  
  446.       type: "gaussian"  
  447.       std: 0.01  
  448.     }  
  449.     bias_filler {  
  450.       type: "constant"  
  451.       value: 0  
  452.     }  
  453.   }  
  454. }  
  455. layer {  
  456.   bottom: "conv5_1"  
  457.   top: "conv5_1"  
  458.   name: "relu5_1"  
  459.   type: "ReLU"  
  460. }  
  461. layer {  
  462.   bottom: "conv5_1"  
  463.   top: "conv5_2"  
  464.   name: "conv5_2"  
  465.   type: "Convolution"  
  466.   param {  
  467.     lr_mult: 1  
  468.     decay_mult: 1  
  469.   }  
  470.   param {  
  471.     lr_mult: 2  
  472.     decay_mult: 0  
  473.   }  
  474.   convolution_param {  
  475.     num_output: 512  
  476.     pad: 1  
  477.     kernel_size: 3  
  478.     weight_filler {  
  479.       type: "gaussian"  
  480.       std: 0.01  
  481.     }  
  482.     bias_filler {  
  483.       type: "constant"  
  484.       value: 0  
  485.     }  
  486.   }  
  487. }  
  488. layer {  
  489.   bottom: "conv5_2"  
  490.   top: "conv5_2"  
  491.   name: "relu5_2"  
  492.   type: "ReLU"  
  493. }  
  494. layer {  
  495.   bottom: "conv5_2"  
  496.   top: "conv5_3"  
  497.   name: "conv5_3"  
  498.   type: "Convolution"  
  499.   param {  
  500.     lr_mult: 1  
  501.     decay_mult: 1  
  502.   }  
  503.   param {  
  504.     lr_mult: 2  
  505.     decay_mult: 0  
  506.   }  
  507.   convolution_param {  
  508.     num_output: 512  
  509.     pad: 1  
  510.     kernel_size: 3  
  511.     weight_filler {  
  512.       type: "gaussian"  
  513.       std: 0.01  
  514.     }  
  515.     bias_filler {  
  516.       type: "constant"  
  517.       value: 0  
  518.     }  
  519.   }  
  520. }  
  521. layer {  
  522.   bottom: "conv5_3"  
  523.   top: "conv5_3"  
  524.   name: "relu5_3"  
  525.   type: "ReLU"  
  526. }  
  527. layer {  
  528.   bottom: "conv5_3"  
  529.   top: "pool5"  
  530.   name: "pool5"  
  531.   type: "Pooling"  
  532.   pooling_param {  
  533.     pool: MAX  
  534.     kernel_size: 2  
  535.     stride: 2  
  536.   }  
  537. }  
  538. layer {  
  539.   bottom: "pool5"  
  540.   top: "fc6"  
  541.   name: "fc6"  
  542.   type: "InnerProduct"  
  543.   param {  
  544.     lr_mult: 1  
  545.     decay_mult: 1  
  546.   }  
  547.   param {  
  548.     lr_mult: 2  
  549.     decay_mult: 0  
  550.   }  
  551.   inner_product_param {  
  552.     num_output: 4096  
  553.     weight_filler {  
  554.       type: "gaussian"  
  555.       std: 0.005  
  556.     }  
  557.     bias_filler {  
  558.       type: "constant"  
  559.       value: 0.1  
  560.     }  
  561.   }  
  562. }  
  563. layer {  
  564.   bottom: "fc6"  
  565.   top: "fc6"  
  566.   name: "relu6"  
  567.   type: "ReLU"  
  568. }  
  569. layer {  
  570.   bottom: "fc6"  
  571.   top: "fc6"  
  572.   name: "drop6"  
  573.   type: "Dropout"  
  574.   dropout_param {  
  575.     dropout_ratio: 0.5  
  576.   }  
  577. }  
  578. layer {  
  579.   bottom: "fc6"  
  580.   top: "fc7"  
  581.   name: "fc7"  
  582.   type: "InnerProduct"  
  583.   param {  
  584.     lr_mult: 1  
  585.     decay_mult: 1  
  586.   }  
  587.   param {  
  588.     lr_mult: 2  
  589.     decay_mult: 0  
  590.   }  
  591.   inner_product_param {  
  592.     num_output: 4096  
  593.     weight_filler {  
  594.       type: "gaussian"  
  595.       std: 0.005  
  596.     }  
  597.     bias_filler {  
  598.       type: "constant"  
  599.       value: 0.1  
  600.     }  
  601.   }  
  602. }  
  603. layer {  
  604.   bottom: "fc7"  
  605.   top: "fc7"  
  606.   name: "relu7"  
  607.   type: "ReLU"  
  608. }  
  609. layer {  
  610.   bottom: "fc7"  
  611.   top: "fc7"  
  612.   name: "drop7"  
  613.   type: "Dropout"  
  614.   dropout_param {  
  615.     dropout_ratio: 0.5  
  616.   }  
  617. }  
  618. layer {  
  619.   bottom: "fc7"  
  620.   top: "fc8"  
  621.   name: "fc8"  
  622.   type: "InnerProduct"  
  623.   param {  
  624.     lr_mult: 1  
  625.     decay_mult: 1  
  626.   }  
  627.   param {  
  628.     lr_mult: 2  
  629.     decay_mult: 0  
  630.   }  
  631.   inner_product_param {  
  632.     num_output: 1000  
  633.     weight_filler {  
  634.       type: "gaussian"  
  635.       std: 0.005  
  636.     }  
  637.     bias_filler {  
  638.       type: "constant"  
  639.       value: 0.1  
  640.     }  
  641.   }  
  642. }  
  643. layer {  
  644.   name: "accuracy_at_1"  
  645.   type: "Accuracy"  
  646.   bottom: "fc8"  
  647.   bottom: "label"  
  648.   top: "accuracy_at_1"  
  649.   accuracy_param {  
  650.     top_k: 1  
  651.   }  
  652.   include {  
  653.     phase: TEST  
  654.   }  
  655. }  
  656. layer {  
  657.   name: "accuracy_at_5"  
  658.   type: "Accuracy"  
  659.   bottom: "fc8"  
  660.   bottom: "label"  
  661.   top: "accuracy_at_5"  
  662.   accuracy_param {  
  663.     top_k: 5  
  664.   }  
  665.   include {  
  666.     phase: TEST  
  667.   }  
  668. }  
  669. layer {  
  670.   bottom: "fc8"  
  671.   bottom: "label"  
  672.   top: "loss"  
  673.   name: "loss"  
  674.   type: "SoftmaxWithLoss"  
  675. }