Advertisement
Guest User

Untitled

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