Advertisement
Guest User

Untitled

a guest
Oct 20th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.85 KB | None | 0 0
  1. name: "ResNet-50"
  2. layer {
  3. name: 'input-data'
  4. type: 'Python'
  5. top: 'data'
  6. top: 'im_info'
  7. top: 'gt_boxes'
  8. python_param {
  9. module: 'roi_data_layer.layer'
  10. layer: 'RoIDataLayer'
  11. param_str: "'num_classes': 81"
  12. }
  13. }
  14. #===============CONV1===========
  15. layer {
  16. name: "conv1"
  17. type: "Convolution"
  18. bottom: "data"
  19. top: "conv1"
  20. param {
  21. lr_mult: 1
  22. decay_mult: 1
  23. }
  24. convolution_param {
  25. num_output: 64
  26. bias_term: false
  27. pad: 1
  28. kernel_size: 3
  29. stride: 2
  30. weight_filler {
  31. type: "msra"
  32. }
  33. }
  34. }
  35. layer {
  36. name: "conv1_bn"
  37. type: "BatchNorm"
  38. bottom: "conv1"
  39. top: "conv1"
  40. }
  41. layer {
  42. name: "conv1_scale"
  43. type: "Scale"
  44. bottom: "conv1"
  45. top: "conv1"
  46. scale_param {
  47. filler {
  48. value: 1
  49. }
  50. bias_term: true
  51. bias_filler {
  52. value: 1
  53. }
  54. }
  55. }
  56. layer {
  57. name: "conv1_relu"
  58. bottom: "conv1"
  59. top: "conv1"
  60. type: "ReLU"
  61. }
  62.  
  63. #===rpn1===
  64. layer {
  65. name: "rpn_cls_score1"
  66. type: "Convolution"
  67. bottom: "conv1"
  68. top: "rpn_cls_score1"
  69. param { lr_mult: 1.0 decay_mult: 1.0 }
  70. param { lr_mult: 2.0 decay_mult: 0 }
  71. convolution_param {
  72. num_output: 18 # 2(bg/fg) * 9(anchors)
  73. kernel_size: 1 pad: 0 stride: 1
  74. weight_filler { type: "gaussian" std: 0.01 }
  75. bias_filler { type: "constant" value: 0 }
  76. }
  77. }
  78.  
  79. layer {
  80. name: "rpn_bbox_pred1"
  81. type: "Convolution"
  82. bottom: "conv1"
  83. top: "rpn_bbox_pred1"
  84. param { lr_mult: 1.0 decay_mult: 1.0 }
  85. param { lr_mult: 2.0 decay_mult: 0 }
  86. convolution_param {
  87. num_output: 36 # 4 * 9(anchors)
  88. kernel_size: 1 pad: 0 stride: 1
  89. weight_filler { type: "gaussian" std: 0.01 }
  90. bias_filler { type: "constant" value: 0 }
  91. }
  92. }
  93. layer {
  94. bottom: "rpn_cls_score1"
  95. top: "rpn_cls_score_reshape1"
  96. name: "rpn_cls_score_reshape1"
  97. type: "Reshape"
  98. reshape_param { shape { dim: 0 dim: 2 dim: -1 dim: 0 } }
  99. }
  100.  
  101.  
  102. #===============CONV2===========
  103. layer {
  104. name: "conv2"
  105. type: "Convolution"
  106. bottom: "conv1"
  107. top: "conv2"
  108. param {
  109. lr_mult: 1
  110. decay_mult: 1
  111. }
  112. convolution_param {
  113. num_output: 128
  114. bias_term: false
  115. pad: 1
  116. kernel_size: 3
  117. stride: 2
  118. weight_filler {
  119. type: "msra"
  120. }
  121. }
  122. }
  123. layer {
  124. name: "conv2_bn"
  125. type: "BatchNorm"
  126. bottom: "conv2"
  127. top: "conv2"
  128. }
  129. layer {
  130. name: "conv2_scale"
  131. type: "Scale"
  132. bottom: "conv2"
  133. top: "conv2"
  134. scale_param {
  135. filler {
  136. value: 1
  137. }
  138. bias_term: true
  139. bias_filler {
  140. value: 1
  141. }
  142. }
  143. }
  144. layer {
  145. name: "conv2_relu"
  146. bottom: "conv2"
  147. top: "conv2"
  148. type: "ReLU"
  149. }
  150.  
  151.  
  152. #===rpn2===
  153. layer {
  154. name: "rpn_cls_score2"
  155. type: "Convolution"
  156. bottom: "conv2"
  157. top: "rpn_cls_score2"
  158. param { lr_mult: 1.0 decay_mult: 1.0 }
  159. param { lr_mult: 2.0 decay_mult: 0 }
  160. convolution_param {
  161. num_output: 18 # 2(bg/fg) * 9(anchors)
  162. kernel_size: 1 pad: 0 stride: 1
  163. weight_filler { type: "gaussian" std: 0.01 }
  164. bias_filler { type: "constant" value: 0 }
  165. }
  166. }
  167.  
  168. layer {
  169. name: "rpn_bbox_pred2"
  170. type: "Convolution"
  171. bottom: "conv2"
  172. top: "rpn_bbox_pred2"
  173. param { lr_mult: 1.0 decay_mult: 1.0 }
  174. param { lr_mult: 2.0 decay_mult: 0 }
  175. convolution_param {
  176. num_output: 36 # 4 * 9(anchors)
  177. kernel_size: 1 pad: 0 stride: 1
  178. weight_filler { type: "gaussian" std: 0.01 }
  179. bias_filler { type: "constant" value: 0 }
  180. }
  181. }
  182. layer {
  183. bottom: "rpn_cls_score2"
  184. top: "rpn_cls_score_reshape2"
  185. name: "rpn_cls_score_reshape2"
  186. type: "Reshape"
  187. reshape_param { shape { dim: 0 dim: 2 dim: -1 dim: 0 } }
  188. }
  189.  
  190.  
  191. #===============CONV3===========
  192. layer {
  193. name: "conv3"
  194. type: "Convolution"
  195. bottom: "conv2"
  196. top: "conv3"
  197. param {
  198. lr_mult: 1
  199. decay_mult: 1
  200. }
  201. convolution_param {
  202. num_output: 256
  203. bias_term: false
  204. pad: 1
  205. kernel_size: 3
  206. stride: 2
  207. weight_filler {
  208. type: "msra"
  209. }
  210. }
  211. }
  212. layer {
  213. name: "conv3_bn"
  214. type: "BatchNorm"
  215. bottom: "conv3"
  216. top: "conv3"
  217. }
  218. layer {
  219. name: "conv3_scale"
  220. type: "Scale"
  221. bottom: "conv3"
  222. top: "conv3"
  223. scale_param {
  224. filler {
  225. value: 1
  226. }
  227. bias_term: true
  228. bias_filler {
  229. value: 1
  230. }
  231. }
  232. }
  233. layer {
  234. name: "conv3_relu"
  235. bottom: "conv3"
  236. top: "conv3"
  237. type: "ReLU"
  238. }
  239.  
  240.  
  241. #===rpn3===
  242. layer {
  243. name: "rpn_cls_score3"
  244. type: "Convolution"
  245. bottom: "conv3"
  246. top: "rpn_cls_score3"
  247. param { lr_mult: 1.0 decay_mult: 1.0 }
  248. param { lr_mult: 2.0 decay_mult: 0 }
  249. convolution_param {
  250. num_output: 18 # 2(bg/fg) * 9(anchors)
  251. kernel_size: 1 pad: 0 stride: 1
  252. weight_filler { type: "gaussian" std: 0.01 }
  253. bias_filler { type: "constant" value: 0 }
  254. }
  255. }
  256.  
  257. layer {
  258. name: "rpn_bbox_pred3"
  259. type: "Convolution"
  260. bottom: "conv3"
  261. top: "rpn_bbox_pred3"
  262. param { lr_mult: 1.0 decay_mult: 1.0 }
  263. param { lr_mult: 2.0 decay_mult: 0 }
  264. convolution_param {
  265. num_output: 36 # 4 * 9(anchors)
  266. kernel_size: 1 pad: 0 stride: 1
  267. weight_filler { type: "gaussian" std: 0.01 }
  268. bias_filler { type: "constant" value: 0 }
  269. }
  270. }
  271. layer {
  272. bottom: "rpn_cls_score3"
  273. top: "rpn_cls_score_reshape3"
  274. name: "rpn_cls_score_reshape3"
  275. type: "Reshape"
  276. reshape_param { shape { dim: 0 dim: 2 dim: -1 dim: 0 } }
  277. }
  278.  
  279. #===============CONV4===========
  280. layer {
  281. name: "conv4"
  282. type: "Convolution"
  283. bottom: "conv3"
  284. top: "conv4"
  285. param {
  286. lr_mult: 1
  287. decay_mult: 1
  288. }
  289. convolution_param {
  290. num_output: 512
  291. bias_term: false
  292. pad: 1
  293. kernel_size: 3
  294. stride: 2
  295. weight_filler {
  296. type: "msra"
  297. }
  298. }
  299. }
  300. layer {
  301. name: "conv4_bn"
  302. type: "BatchNorm"
  303. bottom: "conv4"
  304. top: "conv4"
  305. }
  306. layer {
  307. name: "conv4_scale"
  308. type: "Scale"
  309. bottom: "conv4"
  310. top: "conv4"
  311. scale_param {
  312. filler {
  313. value: 1
  314. }
  315. bias_term: true
  316. bias_filler {
  317. value: 1
  318. }
  319. }
  320. }
  321. layer {
  322. name: "conv4_relu"
  323. bottom: "conv4"
  324. top: "conv4"
  325. type: "ReLU"
  326. }
  327.  
  328.  
  329. #===rpn4===
  330. layer {
  331. name: "rpn_cls_score4"
  332. type: "Convolution"
  333. bottom: "conv4"
  334. top: "rpn_cls_score4"
  335. param { lr_mult: 1.0 decay_mult: 1.0 }
  336. param { lr_mult: 2.0 decay_mult: 0 }
  337. convolution_param {
  338. num_output: 18 # 2(bg/fg) * 9(anchors)
  339. kernel_size: 1 pad: 0 stride: 1
  340. weight_filler { type: "gaussian" std: 0.01 }
  341. bias_filler { type: "constant" value: 0 }
  342. }
  343. }
  344.  
  345. layer {
  346. name: "rpn_bbox_pred4"
  347. type: "Convolution"
  348. bottom: "conv4"
  349. top: "rpn_bbox_pred4"
  350. param { lr_mult: 1.0 decay_mult: 1.0 }
  351. param { lr_mult: 2.0 decay_mult: 0 }
  352. convolution_param {
  353. num_output: 36 # 4 * 9(anchors)
  354. kernel_size: 1 pad: 0 stride: 1
  355. weight_filler { type: "gaussian" std: 0.01 }
  356. bias_filler { type: "constant" value: 0 }
  357. }
  358. }
  359. layer {
  360. bottom: "rpn_cls_score4"
  361. top: "rpn_cls_score_reshape4"
  362. name: "rpn_cls_score_reshape4"
  363. type: "Reshape"
  364. reshape_param { shape { dim: 0 dim: 2 dim: -1 dim: 0 } }
  365. }
  366.  
  367.  
  368. #===============CONV5===========
  369. layer {
  370. name: "conv5"
  371. type: "Convolution"
  372. bottom: "conv4"
  373. top: "conv5"
  374. param {
  375. lr_mult: 1
  376. decay_mult: 1
  377. }
  378. convolution_param {
  379. num_output: 1024
  380. bias_term: false
  381. pad: 1
  382. kernel_size: 3
  383. stride: 2
  384. weight_filler {
  385. type: "msra"
  386. }
  387. }
  388. }
  389. layer {
  390. name: "conv5_bn"
  391. type: "BatchNorm"
  392. bottom: "conv5"
  393. top: "conv5"
  394. }
  395. layer {
  396. name: "conv5_scale"
  397. type: "Scale"
  398. bottom: "conv5"
  399. top: "conv5"
  400. scale_param {
  401. filler {
  402. value: 1
  403. }
  404. bias_term: true
  405. bias_filler {
  406. value: 1
  407. }
  408. }
  409. }
  410. layer {
  411. name: "conv5_relu"
  412. bottom: "conv5"
  413. top: "conv5"
  414. type: "ReLU"
  415. }
  416.  
  417.  
  418. #===rpn5===
  419. layer {
  420. name: "rpn_cls_score5"
  421. type: "Convolution"
  422. bottom: "conv5"
  423. top: "rpn_cls_score5"
  424. param { lr_mult: 1.0 decay_mult: 1.0 }
  425. param { lr_mult: 2.0 decay_mult: 0 }
  426. convolution_param {
  427. num_output: 18 # 2(bg/fg) * 9(anchors)
  428. kernel_size: 1 pad: 0 stride: 1
  429. weight_filler { type: "gaussian" std: 0.01 }
  430. bias_filler { type: "constant" value: 0 }
  431. }
  432. }
  433.  
  434. layer {
  435. name: "rpn_bbox_pred5"
  436. type: "Convolution"
  437. bottom: "conv5"
  438. top: "rpn_bbox_pred5"
  439. param { lr_mult: 1.0 decay_mult: 1.0 }
  440. param { lr_mult: 2.0 decay_mult: 0 }
  441. convolution_param {
  442. num_output: 36 # 4 * 9(anchors)
  443. kernel_size: 1 pad: 0 stride: 1
  444. weight_filler { type: "gaussian" std: 0.01 }
  445. bias_filler { type: "constant" value: 0 }
  446. }
  447. }
  448. layer {
  449. bottom: "rpn_cls_score5"
  450. top: "rpn_cls_score_reshape5"
  451. name: "rpn_cls_score_reshape5"
  452. type: "Reshape"
  453. reshape_param { shape { dim: 0 dim: 2 dim: -1 dim: 0 } }
  454. }
  455.  
  456.  
  457. #===loss===
  458.  
  459. layer {
  460. name: "rpn_loss_bbox"
  461. type: "SmoothL1Loss"
  462. bottom: "rpn_bbox_pred1"
  463. bottom: "rpn_bbox_pred2"
  464. bottom: "rpn_bbox_pred3"
  465. bottom: "rpn_bbox_pred4"
  466. bottom: "rpn_bbox_pred5"
  467. bottom: "gt_boxes"
  468. top: "rpn_loss_bbox"
  469. loss_weight: 1
  470. smooth_l1_loss_param { sigma: 3.0 }
  471. }
  472. layer {
  473. name: "rpn_loss_cls"
  474. type: "SoftmaxWithLoss"
  475. bottom: "rpn_cls_score_reshape1"
  476. bottom: "rpn_cls_score_reshape2"
  477. bottom: "rpn_cls_score_reshape3"
  478. bottom: "rpn_cls_score_reshape4"
  479. bottom: "rpn_cls_score_reshape5"
  480. bottom: "gt_boxes"
  481. propagate_down: 1
  482. propagate_down: 0
  483. top: "rpn_cls_loss"
  484. loss_weight: 1
  485. loss_param {
  486. ignore_label: -1
  487. normalize: true
  488. }
  489. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement