Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.69 KB | None | 0 0
  1. name: "cnn_lstm_softmax"
  2. layer {
  3. name: "data"
  4. type: "Python"
  5. top: "data"
  6. top: "label"
  7. top: "clip_markers"
  8. python_param {
  9. module: "my_obj_input_layer"
  10. layer: "ReadTrain"
  11. }
  12. include: { phase: TRAIN }
  13. }
  14.  
  15. layer {
  16. name: "data"
  17. type: "Python"
  18. top: "data"
  19. top: "label"
  20. top: "clip_markers"
  21. python_param {
  22. module: "my_obj_input_layer"
  23. layer: "ReadTest"
  24. }
  25. include: { phase: TEST stage: "test-on-test" }
  26. }
  27.  
  28. layer {
  29. name: "conv1"
  30. type: "Convolution"
  31. bottom: "data"
  32. top: "conv1"
  33. param {
  34. lr_mult: 1
  35. decay_mult: 1
  36. }
  37. param {
  38. lr_mult: 2
  39. decay_mult: 0
  40. }
  41. convolution_param {
  42. num_output: 96
  43. kernel_size: 11
  44. stride: 4
  45. weight_filler {
  46. type: "gaussian"
  47. std: 0.01
  48. }
  49. bias_filler {
  50. type: "constant"
  51. value: 0
  52. }
  53. }
  54. }
  55. layer {
  56. name: "relu1"
  57. type: "ReLU"
  58. bottom: "conv1"
  59. top: "conv1"
  60. }
  61. layer {
  62. name: "norm1"
  63. type: "LRN"
  64. bottom: "conv1"
  65. top: "norm1"
  66. lrn_param {
  67. local_size: 5
  68. alpha: 0.0001
  69. beta: 0.75
  70. }
  71. }
  72. layer {
  73. name: "pool1"
  74. type: "Pooling"
  75. bottom: "norm1"
  76. top: "pool1"
  77. pooling_param {
  78. pool: MAX
  79. kernel_size: 3
  80. stride: 2
  81. }
  82. }
  83. layer {
  84. name: "conv2"
  85. type: "Convolution"
  86. bottom: "pool1"
  87. top: "conv2"
  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: 256
  98. pad: 2
  99. kernel_size: 5
  100. group: 2
  101. weight_filler {
  102. type: "gaussian"
  103. std: 0.01
  104. }
  105. bias_filler {
  106. type: "constant"
  107. value: 0.1
  108. }
  109. }
  110. }
  111. layer {
  112. name: "relu2"
  113. type: "ReLU"
  114. bottom: "conv2"
  115. top: "conv2"
  116. }
  117. layer {
  118. name: "norm2"
  119. type: "LRN"
  120. bottom: "conv2"
  121. top: "norm2"
  122. lrn_param {
  123. local_size: 5
  124. alpha: 0.0001
  125. beta: 0.75
  126. }
  127. }
  128. layer {
  129. name: "pool2"
  130. type: "Pooling"
  131. bottom: "norm2"
  132. top: "pool2"
  133. pooling_param {
  134. pool: MAX
  135. kernel_size: 3
  136. stride: 2
  137. }
  138. }
  139. layer {
  140. name: "conv3"
  141. type: "Convolution"
  142. bottom: "pool2"
  143. top: "conv3"
  144. param {
  145. lr_mult: 1
  146. decay_mult: 1
  147. }
  148. param {
  149. lr_mult: 2
  150. decay_mult: 0
  151. }
  152. convolution_param {
  153. num_output: 384
  154. pad: 1
  155. kernel_size: 3
  156. weight_filler {
  157. type: "gaussian"
  158. std: 0.01
  159. }
  160. bias_filler {
  161. type: "constant"
  162. value: 0
  163. }
  164. }
  165. }
  166. layer {
  167. name: "relu3"
  168. type: "ReLU"
  169. bottom: "conv3"
  170. top: "conv3"
  171. }
  172. layer {
  173. name: "conv4"
  174. type: "Convolution"
  175. bottom: "conv3"
  176. top: "conv4"
  177. param {
  178. lr_mult: 1
  179. decay_mult: 1
  180. }
  181. param {
  182. lr_mult: 2
  183. decay_mult: 0
  184. }
  185. convolution_param {
  186. num_output: 384
  187. pad: 1
  188. kernel_size: 3
  189. group: 2
  190. weight_filler {
  191. type: "gaussian"
  192. std: 0.01
  193. }
  194. bias_filler {
  195. type: "constant"
  196. value: 0.1
  197. }
  198. }
  199. }
  200. layer {
  201. name: "relu4"
  202. type: "ReLU"
  203. bottom: "conv4"
  204. top: "conv4"
  205. }
  206. layer {
  207. name: "conv5"
  208. type: "Convolution"
  209. bottom: "conv4"
  210. top: "conv5"
  211. param {
  212. lr_mult: 1
  213. decay_mult: 1
  214. }
  215. param {
  216. lr_mult: 2
  217. decay_mult: 0
  218. }
  219. convolution_param {
  220. num_output: 256
  221. pad: 1
  222. kernel_size: 3
  223. group: 2
  224. weight_filler {
  225. type: "gaussian"
  226. std: 0.01
  227. }
  228. bias_filler {
  229. type: "constant"
  230. value: 0.1
  231. }
  232. }
  233. }
  234. layer {
  235. name: "relu5"
  236. type: "ReLU"
  237. bottom: "conv5"
  238. top: "conv5"
  239. }
  240. layer {
  241. name: "pool5"
  242. type: "Pooling"
  243. bottom: "conv5"
  244. top: "pool5"
  245. pooling_param {
  246. pool: MAX
  247. kernel_size: 3
  248. stride: 2
  249. }
  250. }
  251. layer {
  252. name: "fc6"
  253. type: "InnerProduct"
  254. bottom: "pool5"
  255. top: "fc6"
  256. param {
  257. lr_mult: 1
  258. decay_mult: 1
  259. }
  260. param {
  261. lr_mult: 2
  262. decay_mult: 0
  263. }
  264. inner_product_param {
  265. num_output: 4096
  266. weight_filler {
  267. type: "gaussian"
  268. std: 0.005
  269. }
  270. bias_filler {
  271. type: "constant"
  272. value: 0.1
  273. }
  274. }
  275. }
  276. layer {
  277. name: "relu6"
  278. type: "ReLU"
  279. bottom: "fc6"
  280. top: "fc6"
  281. }
  282. layer {
  283. name: "drop6"
  284. type: "Dropout"
  285. bottom: "fc6"
  286. top: "fc6"
  287. dropout_param {
  288. dropout_ratio: 0.5
  289. }
  290. }
  291.  
  292. layer {
  293. name: "fc7"
  294. type: "InnerProduct"
  295. bottom: "fc6"
  296. top: "fc7"
  297. param {
  298. lr_mult: 1
  299. decay_mult: 1
  300. }
  301. param {
  302. lr_mult: 2
  303. decay_mult: 0
  304. }
  305. inner_product_param {
  306. num_output: 4096
  307. weight_filler {
  308. type: "gaussian"
  309. std: 0.005
  310. }
  311. bias_filler {
  312. type: "constant"
  313. value: 0.1
  314. }
  315. }
  316. }
  317.  
  318. layer {
  319. name: "relu7"
  320. type: "ReLU"
  321. bottom: "fc7"
  322. top: "fc7"
  323. }
  324.  
  325. layer {
  326. name: "drop7"
  327. type: "Dropout"
  328. bottom: "fc7"
  329. top: "fc7"
  330. dropout_param {
  331. dropout_ratio: 0.5
  332. }
  333. }
  334.  
  335. layer{
  336. name: "reshape-data"
  337. type: "Reshape"
  338. bottom: "fc7"
  339. top: "reshape-data"
  340. reshape_param{
  341. shape{
  342. dim: 16
  343. dim: 3
  344. dim: 4096
  345. }
  346. }
  347. }
  348.  
  349. layer {
  350. name: "reshape-cm"
  351. type: "Reshape"
  352. bottom: "clip_markers"
  353. top: "reshape-cm"
  354. reshape_param {
  355. shape{
  356. dim: 16
  357. dim: 3
  358. }
  359. }
  360. }
  361.  
  362. layer {
  363. name: "lstm1"
  364. type: "LSTM"
  365. bottom: "reshape-data"
  366. bottom: "reshape-cm"
  367. top: "lstm1"
  368. recurrent_param {
  369. num_output: 4096
  370. weight_filler {
  371. type: "uniform"
  372. min: -0.01
  373. max: 0.01
  374. }
  375. bias_filler {
  376. type: "constant"
  377. value: 0
  378. }
  379. }
  380. }
  381.  
  382. layer {
  383. name: "lstm1_slice"
  384. type: "Slice"
  385. bottom: "lstm1"
  386. top: "lstm1_0"
  387. top: "lstm1_1"
  388. top: "lstm1_2"
  389. top: "lstm1_3"
  390. top: "lstm1_4"
  391. top: "lstm1_5"
  392. top: "lstm1_6"
  393. top: "lstm1_7"
  394. top: "lstm1_8"
  395. top: "lstm1_9"
  396. top: "lstm1_10"
  397. top: "lstm1_11"
  398. top: "lstm1_12"
  399. top: "lstm1_13"
  400. top: "lstm1_14"
  401. top: "lstm1_15"
  402. slice_param {
  403. axis: 0
  404. }
  405. }
  406.  
  407. layer {
  408. name: "maxpool"
  409. type: "Eltwise"
  410. bottom: "lstm1_0"
  411. bottom: "lstm1_1"
  412. bottom: "lstm1_2"
  413. bottom: "lstm1_3"
  414. bottom: "lstm1_4"
  415. bottom: "lstm1_5"
  416. bottom: "lstm1_6"
  417. bottom: "lstm1_7"
  418. bottom: "lstm1_8"
  419. bottom: "lstm1_9"
  420. bottom: "lstm1_10"
  421. bottom: "lstm1_11"
  422. bottom: "lstm1_12"
  423. bottom: "lstm1_13"
  424. bottom: "lstm1_14"
  425. bottom: "lstm1_15"
  426. top: "maxpool"
  427. eltwise_param {
  428. operation: MAX
  429. }
  430. }
  431.  
  432. layer{
  433. name: "reshape-lstm"
  434. type: "Reshape"
  435. bottom: "maxpool"
  436. top: "reshape-lstm"
  437. reshape_param {
  438. shape {
  439. dim: 3
  440. dim: 4096
  441. }
  442. }
  443. }
  444.  
  445. layer {
  446. name: "lstm1-drop"
  447. type: "Dropout"
  448. bottom: "reshape-lstm"
  449. top: "lstm1-drop"
  450. dropout_param {
  451. dropout_ratio: 0.5
  452. }
  453. }
  454.  
  455. layer {
  456. name: "fc8"
  457. type: "InnerProduct"
  458. bottom: "lstm1-drop"
  459. top: "fc8"
  460. param {
  461. lr_mult: 1
  462. decay_mult: 1
  463. }
  464. param {
  465. lr_mult: 2
  466. decay_mult: 0
  467. }
  468. inner_product_param {
  469. num_output: 10
  470. weight_filler {
  471. type: "gaussian"
  472. std: 0.01
  473. }
  474. bias_filler {
  475. type: "constant"
  476. value: 0
  477. }
  478. }
  479. }
  480.  
  481. layer {
  482. name: "accuracy"
  483. type: "Accuracy"
  484. bottom: "fc8"
  485. bottom: "label"
  486. top: "accuracy"
  487. }
  488. layer {
  489. name: "loss"
  490. type: "SoftmaxWithLoss"
  491. bottom: "fc8"
  492. bottom: "label"
  493. top: "loss"
  494. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement