Advertisement
Guest User

train.prototxt

a guest
Mar 1st, 2019
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.34 KB | None | 0 0
  1. name: "segnet"
  2. layer {
  3. name: "data"
  4. type: "HDF5Data"
  5. top: "data"
  6. top: "label"
  7. hdf5_data_param {
  8. source: "/home/petra/data_volumes/CA17_data_volume_saliency_alpha_full/train.txt"
  9. batch_size: 1
  10. shuffle: true
  11. }
  12. }
  13. layer {
  14. name: "norm"
  15. type: "LRN"
  16. bottom: "data"
  17. top: "norm"
  18. lrn_param {
  19. local_size: 5
  20. alpha: 0.0001
  21. beta: 0.75
  22. }
  23. }
  24. layer {
  25. name: "conv0"
  26. type: "Convolution"
  27. bottom: "norm"
  28. top: "conv0"
  29. param {
  30. lr_mult: 1
  31. decay_mult: 1
  32. }
  33. param {
  34. lr_mult: 2
  35. decay_mult: 0
  36. }
  37. convolution_param {
  38. num_output: 64
  39. kernel_size: 7
  40. pad: 3
  41. weight_filler {
  42. type: "msra"
  43. }
  44. bias_filler {
  45. type: "constant"
  46. }
  47. }
  48. }
  49. layer {
  50. bottom: "conv0"
  51. top: "conv0"
  52. name: "conv0_bn"
  53. type: "BN"
  54. bn_param {
  55. scale_filler {
  56. type: "constant"
  57. value: 1
  58. }
  59. shift_filler {
  60. type: "constant"
  61. value: 0.001
  62. }
  63. }
  64. }
  65. layer {
  66. name: "relu0"
  67. type: "ReLU"
  68. bottom: "conv0"
  69. top: "conv0"
  70. }
  71. layer {
  72. name: "pool0"
  73. type: "Pooling"
  74. bottom: "conv0"
  75. top: "pool0"
  76. top: "pool0_mask"
  77. pooling_param {
  78. pool: MAX
  79. kernel_size: 2
  80. stride: 2
  81. }
  82. }
  83. layer {
  84. name: "conv1"
  85. type: "Convolution"
  86. bottom: "pool0"
  87. top: "conv1"
  88. param {
  89. lr_mult: 1
  90. decay_mult: 1
  91. }
  92. param {
  93. lr_mult: 2
  94. decay_mult: 0
  95. }
  96. convolution_param {
  97. num_output: 64
  98. kernel_size: 7
  99. pad: 3
  100. weight_filler {
  101. type: "msra"
  102. }
  103. bias_filler {
  104. type: "constant"
  105. }
  106. }
  107. }
  108. layer {
  109. bottom: "conv1"
  110. top: "conv1"
  111. name: "conv1_bn"
  112. type: "BN"
  113. bn_param {
  114. scale_filler {
  115. type: "constant"
  116. value: 1
  117. }
  118. shift_filler {
  119. type: "constant"
  120. value: 0.001
  121. }
  122. }
  123. }
  124. layer {
  125. name: "relu1"
  126. type: "ReLU"
  127. bottom: "conv1"
  128. top: "conv1"
  129. }
  130. layer {
  131. name: "pool1"
  132. type: "Pooling"
  133. bottom: "conv1"
  134. top: "pool1"
  135. top: "pool1_mask"
  136. pooling_param {
  137. pool: MAX
  138. kernel_size: 2
  139. stride: 2
  140. }
  141. }
  142. layer {
  143. name: "conv2"
  144. type: "Convolution"
  145. bottom: "pool1"
  146. top: "conv2"
  147. param {
  148. lr_mult: 1
  149. decay_mult: 1
  150. }
  151. param {
  152. lr_mult: 2
  153. decay_mult: 0
  154. }
  155. convolution_param {
  156. num_output: 64
  157. kernel_size: 7
  158. pad: 3
  159. weight_filler {
  160. type: "msra"
  161. }
  162. bias_filler {
  163. type: "constant"
  164. }
  165. }
  166. }
  167. layer {
  168. bottom: "conv2"
  169. top: "conv2"
  170. name: "conv2_bn"
  171. type: "BN"
  172. bn_param {
  173. scale_filler {
  174. type: "constant"
  175. value: 1
  176. }
  177. shift_filler {
  178. type: "constant"
  179. value: 0.001
  180. }
  181. }
  182. }
  183. layer {
  184. name: "relu2"
  185. type: "ReLU"
  186. bottom: "conv2"
  187. top: "conv2"
  188. }
  189. layer {
  190. name: "pool2"
  191. type: "Pooling"
  192. bottom: "conv2"
  193. top: "pool2"
  194. top: "pool2_mask"
  195. pooling_param {
  196. pool: MAX
  197. kernel_size: 2
  198. stride: 2
  199. }
  200. }
  201. layer {
  202. name: "conv3"
  203. type: "Convolution"
  204. bottom: "pool2"
  205. top: "conv3"
  206. param {
  207. lr_mult: 1
  208. decay_mult: 1
  209. }
  210. param {
  211. lr_mult: 2
  212. decay_mult: 0
  213. }
  214. convolution_param {
  215. num_output: 64
  216. kernel_size: 7
  217. pad: 3
  218. weight_filler {
  219. type: "msra"
  220. }
  221. bias_filler {
  222. type: "constant"
  223. }
  224. }
  225. }
  226. layer {
  227. bottom: "conv3"
  228. top: "conv3"
  229. name: "conv3_bn"
  230. type: "BN"
  231. bn_param {
  232. scale_filler {
  233. type: "constant"
  234. value: 1
  235. }
  236. shift_filler {
  237. type: "constant"
  238. value: 0.001
  239. }
  240. }
  241. }
  242. layer {
  243. name: "relu3"
  244. type: "ReLU"
  245. bottom: "conv3"
  246. top: "conv3"
  247. }
  248. layer {
  249. name: "pool3"
  250. type: "Pooling"
  251. bottom: "conv3"
  252. top: "pool3"
  253. top: "pool3_mask"
  254. pooling_param {
  255. pool: MAX
  256. kernel_size: 2
  257. stride: 2
  258. }
  259. }
  260. layer {
  261. name: "conv4"
  262. type: "Convolution"
  263. bottom: "pool3"
  264. top: "conv4"
  265. param {
  266. lr_mult: 1
  267. decay_mult: 1
  268. }
  269. param {
  270. lr_mult: 2
  271. decay_mult: 0
  272. }
  273. convolution_param {
  274. num_output: 64
  275. kernel_size: 7
  276. pad: 3
  277. weight_filler {
  278. type: "msra"
  279. }
  280. bias_filler {
  281. type: "constant"
  282. }
  283. }
  284. }
  285. layer {
  286. bottom: "conv4"
  287. top: "conv4"
  288. name: "conv4_bn"
  289. type: "BN"
  290. bn_param {
  291. scale_filler {
  292. type: "constant"
  293. value: 1
  294. }
  295. shift_filler {
  296. type: "constant"
  297. value: 0.001
  298. }
  299. }
  300. }
  301. layer {
  302. name: "relu4"
  303. type: "ReLU"
  304. bottom: "conv4"
  305. top: "conv4"
  306. }
  307. layer {
  308. name: "pool4"
  309. type: "Pooling"
  310. bottom: "conv4"
  311. top: "pool4"
  312. top: "pool4_mask"
  313. pooling_param {
  314. pool: MAX
  315. kernel_size: 2
  316. stride: 2
  317. }
  318. }
  319. layer {
  320. name: "upsample4"
  321. type: "Upsample"
  322. bottom: "pool4"
  323. bottom: "pool4_mask"
  324. top: "upsample4"
  325. upsample_param {
  326. scale: 2
  327. #pad_out_h: true
  328. }
  329. }
  330. layer {
  331. name: "conv_decode4"
  332. type: "Convolution"
  333. bottom: "upsample4"
  334. top: "conv_decode4"
  335. param {
  336. lr_mult: 1
  337. decay_mult: 1
  338. }
  339. param {
  340. lr_mult: 2
  341. decay_mult: 0
  342. }
  343. convolution_param {
  344. num_output: 64
  345. kernel_size: 7
  346. pad: 3
  347. weight_filler {
  348. type: "msra"
  349. }
  350. bias_filler {
  351. type: "constant"
  352. }
  353. }
  354. }
  355. layer {
  356. bottom: "conv_decode4"
  357. top: "conv_decode4"
  358. name: "conv_decode4_bn"
  359. type: "BN"
  360. bn_param {
  361. scale_filler {
  362. type: "constant"
  363. value: 1
  364. }
  365. shift_filler {
  366. type: "constant"
  367. value: 0.001
  368. }
  369. }
  370. }
  371. layer {
  372. name: "upsample3"
  373. type: "Upsample"
  374. bottom: "conv_decode4"
  375. bottom: "pool3_mask"
  376. top: "upsample3"
  377. upsample_param {
  378. scale: 2
  379. }
  380. }
  381. layer {
  382. name: "conv_decode3"
  383. type: "Convolution"
  384. bottom: "upsample3"
  385. top: "conv_decode3"
  386. param {
  387. lr_mult: 1
  388. decay_mult: 1
  389. }
  390. param {
  391. lr_mult: 2
  392. decay_mult: 0
  393. }
  394. convolution_param {
  395. num_output: 64
  396. kernel_size: 7
  397. pad: 3
  398. weight_filler {
  399. type: "msra"
  400. }
  401. bias_filler {
  402. type: "constant"
  403. }
  404. }
  405. }
  406. layer {
  407. bottom: "conv_decode3"
  408. top: "conv_decode3"
  409. name: "conv_decode3_bn"
  410. type: "BN"
  411. bn_param {
  412. scale_filler {
  413. type: "constant"
  414. value: 1
  415. }
  416. shift_filler {
  417. type: "constant"
  418. value: 0.001
  419. }
  420. }
  421. }
  422. layer {
  423. name: "upsample2"
  424. type: "Upsample"
  425. bottom: "conv_decode3"
  426. bottom: "pool2_mask"
  427. top: "upsample2"
  428. upsample_param {
  429. scale: 2
  430. }
  431. }
  432. layer {
  433. name: "conv_decode2"
  434. type: "Convolution"
  435. bottom: "upsample2"
  436. top: "conv_decode2"
  437. param {
  438. lr_mult: 1
  439. decay_mult: 1
  440. }
  441. param {
  442. lr_mult: 2
  443. decay_mult: 0
  444. }
  445. convolution_param {
  446. num_output: 64
  447. kernel_size: 7
  448. pad: 3
  449. weight_filler {
  450. type: "msra"
  451. }
  452. bias_filler {
  453. type: "constant"
  454. }
  455. }
  456. }
  457. layer {
  458. bottom: "conv_decode2"
  459. top: "conv_decode2"
  460. name: "conv_decode2_bn"
  461. type: "BN"
  462. bn_param {
  463. scale_filler {
  464. type: "constant"
  465. value: 1
  466. }
  467. shift_filler {
  468. type: "constant"
  469. value: 0.001
  470. }
  471. }
  472. }
  473. layer {
  474. name: "upsample1"
  475. type: "Upsample"
  476. bottom: "conv_decode2"
  477. bottom: "pool1_mask"
  478. top: "upsample1"
  479. upsample_param {
  480. scale: 2
  481. }
  482. }
  483. layer {
  484. name: "conv_decode1"
  485. type: "Convolution"
  486. bottom: "upsample1"
  487. top: "conv_decode1"
  488. param {
  489. lr_mult: 1
  490. decay_mult: 1
  491. }
  492. param {
  493. lr_mult: 2
  494. decay_mult: 0
  495. }
  496. convolution_param {
  497. num_output: 64
  498. kernel_size: 7
  499. pad: 3
  500. weight_filler {
  501. type: "msra"
  502. }
  503. bias_filler {
  504. type: "constant"
  505. }
  506. }
  507. }
  508. layer {
  509. bottom: "conv_decode1"
  510. top: "conv_decode1"
  511. name: "conv_decode1_bn"
  512. type: "BN"
  513. bn_param {
  514. scale_filler {
  515. type: "constant"
  516. value: 1
  517. }
  518. shift_filler {
  519. type: "constant"
  520. value: 0.001
  521. }
  522. }
  523. }
  524. layer {
  525. name: "conv_classifier"
  526. type: "Convolution"
  527. bottom: "conv_decode1"
  528. top: "conv_classifier"
  529. param {
  530. lr_mult: 1
  531. decay_mult: 1
  532. }
  533. param {
  534. lr_mult: 2
  535. decay_mult: 0
  536. }
  537. convolution_param {
  538. num_output: 3
  539. kernel_size: 1
  540. weight_filler {
  541. type: "msra"
  542. }
  543. bias_filler {
  544. type: "constant"
  545. }
  546. }
  547. }
  548. layer {
  549. name: "loss"
  550. type: "SoftmaxWithLoss"
  551. bottom: "conv_classifier"
  552. bottom: "label"
  553. top: "loss"
  554. softmax_param {engine: CAFFE}
  555. loss_param: {
  556. weight_by_label_freqs: true
  557. class_weighting: 0.174
  558. class_weighting: 1.551
  559. class_weighting: 1.0
  560. }
  561. }
  562. layer {
  563. name: "accuracy"
  564. type: "Accuracy"
  565. bottom: "conv_classifier"
  566. bottom: "label"
  567. top: "accuracy"
  568. top: "per_class_accuracy"
  569. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement