Advertisement
cjxd

upconv-128.prototxt

May 2nd, 2017
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 4.19 KB | None | 0 0
  1. name: "Up-Conv 2-image CNN"
  2.  
  3. # Inputs
  4. layer {
  5.   name: "data-img1"
  6.   type: "ImageData"
  7.   top: "data-img1"
  8.   top: "data-img1-name"
  9.   image_data_param {
  10.     source: "data/train_camA.txt"
  11.     batch_size: 1
  12.     new_height: 128
  13.     new_width: 128
  14.   }
  15. }
  16. layer {
  17.   name: "data-img2"
  18.   type: "ImageData"
  19.   top: "data-img2"
  20.   top: "data-img2-name"
  21.   image_data_param {
  22.     source: "data/train_camB.txt"
  23.     batch_size: 1
  24.     new_height: 128
  25.     new_width: 128
  26.   }
  27. }
  28. layer {
  29.   name: "data-params"
  30.   type: "Input"
  31.   top: "data-params"
  32.   input_param {
  33.     shape: { dim: 1 dim: 1 }
  34.   }
  35. }
  36. layer {
  37.   name: "data-label"
  38.   type: "ImageData"
  39.   top: "data-label"
  40.   top: "data-label-name"
  41.   image_data_param {
  42.     source: "data/train_camO.txt"
  43.     batch_size: 1
  44.     new_height: 128
  45.     new_width: 128
  46.   }
  47. }
  48. layer {
  49.   name: "data-img1-name-silence"
  50.   type: "Silence"
  51.   bottom: "data-img1-name"
  52. }
  53. layer {
  54.   name: "data-img2-name-silence"
  55.   type: "Silence"
  56.   bottom: "data-img2-name"
  57. }
  58. layer {
  59.   name: "label-name-silence"
  60.   type: "Silence"
  61.   bottom: "data-label-name"
  62. }
  63.  
  64. # FC1
  65. layer {
  66.   name: "fc1-img1"
  67.   type: "InnerProduct"
  68.   bottom: "data-img1"
  69.   top: "fc1img1"
  70.   inner_product_param {
  71.     num_output: 512
  72.   }
  73. }
  74. layer {
  75.   name: "fc1-img1-rec"
  76.   type: "ReLU"
  77.   bottom: "fc1img1"
  78.   top: "fc1img1rec"
  79.   relu_param {
  80.     negative_slope: 0.01
  81.   }
  82. }
  83. layer {
  84.   name: "fc1-img2"
  85.   type: "InnerProduct"
  86.   bottom: "data-img2"
  87.   top: "fc1img2"
  88.   inner_product_param {
  89.     num_output: 512
  90.   }
  91. }
  92. layer {
  93.   name: "fc1-img2-rec"
  94.   type: "ReLU"
  95.   bottom: "fc1img2"
  96.   top: "fc1img2rec"
  97.   relu_param {
  98.     negative_slope: 0.01
  99.   }
  100. }
  101. layer {
  102.   name: "fc1-params"
  103.   type: "InnerProduct"
  104.   bottom: "data-params"
  105.   top: "fc1params"
  106.   inner_product_param {
  107.     num_output: 1
  108.   }
  109. }
  110. layer {
  111.   name: "fc1-params-rec"
  112.   type: "ReLU"
  113.   bottom: "fc1params"
  114.   top: "fc1paramsrec"
  115.   relu_param {
  116.     negative_slope: 0.01
  117.   }
  118. }
  119. layer {
  120.   name: "fc1-concat"
  121.   bottom: "fc1img1rec"
  122.   bottom: "fc1img2rec"
  123.   bottom: "fc1paramsrec"
  124.   top: "fc1"
  125.   type: "Concat"
  126.   concat_param {
  127.     axis: 1
  128.   }
  129. }
  130.  
  131. # FC2
  132. layer {
  133.   name: "fc2"
  134.   type: "InnerProduct"
  135.   bottom: "fc1"
  136.   top: "fc2"
  137.   inner_product_param {
  138.     num_output: 1024
  139.   }
  140. }
  141. layer {
  142.   name: "fc2-rec"
  143.   type: "ReLU"
  144.   bottom: "fc2"
  145.   top: "fc2rec"
  146.   relu_param {
  147.     negative_slope: 0.01
  148.   }
  149. }
  150.  
  151. # upconv1
  152. layer {
  153.   name: "upconv1"
  154.   type: "Deconvolution"
  155.   bottom: "fc2rec"
  156.   top: "upconv1"
  157.   convolution_param {
  158.     num_output: 16384 # 256x8x8
  159.     kernel_size: 5
  160.     stride: 2
  161.   }
  162. }
  163. layer {
  164.   name: "upconv1-rec"
  165.   type: "ReLU"
  166.   bottom: "upconv1"
  167.   top: "upconv1rec"
  168.   relu_param {
  169.     negative_slope: 0.01
  170.   }
  171. }
  172.  
  173. # upconv2
  174. layer {
  175.   name: "upconv2"
  176.   type: "Deconvolution"
  177.   bottom: "upconv1rec"
  178.   top: "upconv2"
  179.   convolution_param {
  180.     num_output: 65536 # 256x16x16
  181.     kernel_size: 5
  182.     stride: 2
  183.   }
  184. }
  185. layer {
  186.   name: "upconv2-rec"
  187.   type: "ReLU"
  188.   bottom: "upconv2"
  189.   top: "upconv2rec"
  190.   relu_param {
  191.     negative_slope: 0.01
  192.   }
  193. }
  194.  
  195. # upconv3
  196. layer {
  197.   name: "upconv3"
  198.   type: "Deconvolution"
  199.   bottom: "upconv2rec"
  200.   top: "upconv3"
  201.   convolution_param {
  202.     num_output: 94208 # 92x32x32
  203.     kernel_size: 5
  204.     stride: 2
  205.   }
  206. }
  207. layer {
  208.   name: "upconv3-rec"
  209.   type: "ReLU"
  210.   bottom: "upconv3"
  211.   top: "upconv3rec"
  212.   relu_param {
  213.     negative_slope: 0.01
  214.   }
  215. }
  216.  
  217. # upconv4
  218. layer {
  219.   name: "upconv4"
  220.   type: "Deconvolution"
  221.   bottom: "upconv3rec"
  222.   top: "upconv4"
  223.   convolution_param {
  224.     num_output: 376832 # 92x64x64
  225.     kernel_size: 5
  226.     stride: 2
  227.   }
  228. }
  229. layer {
  230.   name: "upconv4-rec"
  231.   type: "ReLU"
  232.   bottom: "upconv4"
  233.   top: "upconv4rec"
  234.   relu_param {
  235.     negative_slope: 0.01
  236.   }
  237. }
  238.  
  239. # upconv5
  240. layer {
  241.   name: "upconv5"
  242.   type: "Deconvolution"
  243.   bottom: "upconv4"
  244.   top: "output"
  245.   convolution_param {
  246.     num_output: 49152 # 3x128x128
  247.     kernel_size: 5
  248.     stride: 2
  249.   }
  250. }
  251.  
  252. # output split
  253. layer {
  254.   name: "output-split"
  255.   type: "Split"
  256.   bottom: "output"
  257.   top: "result"
  258.   top: "lossresult"
  259. }
  260.  
  261. # loss
  262. layer {
  263.   name: "loss"
  264.   type: "EuclideanLoss"
  265.   bottom: "lossresult"
  266.   bottom: "data-label"
  267.   top: "loss"
  268. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement