Caffe中卷基层和全连接层训练参数个数如何确定
以Mnist为例,首先贴出网络配置文件:
1. name: \ 2. layer {
3. name: \ 4. type: \ 5. top: \ 6. top: \ 7. data_param {
8. source: \ 9. backend: LEVELDB 10. batch_size: 64 11. }
12. transform_param { 13. scale: 0.00390625 14. }
15. include: { phase: TRAIN } 16. } 17. layer {
18. name: \ 19. type: \ 20. top: \ 21. top: \ 22. data_param {
23. source: \ 24. backend: LEVELDB 25. batch_size: 100 26. }
27. transform_param { 28. scale: 0.00390625 29. }
30. include: { phase: TEST } 31. } 32. layer {
33. name: \ 34. type: \ 35. bottom: \ 36. top: \ 37. param { 38. lr_mult: 1 39. }
40. param { 41. lr_mult: 2 42. }
43. convolution_param { 44. num_output: 20 45. kernel_size: 5 46. stride: 1 47. weight_filler { 48. type: \ 49. }
50. bias_filler { 51. type: \ 52. } 53. } 54. } 55. layer {
56. bottom: \ 57. top: \ 58. name: \ 59. type: \ 60. param { 61. lr_mult: 0 62. decay_mult: 0 63. } 64. param { 65. lr_mult: 0 66. decay_mult: 0 67. } 68. param { 69. lr_mult: 0 70. decay_mult: 0 71. } 72. } 73. layer {
74. bottom: \ 75. top: \ 76. name: \ 77. type: \ 78. scale_param { 79. bias_term: true 80. } 81. } 82. layer {
83. name: \
84. type: \ 85. bottom: \ 86. top: \ 87. pooling_param { 88. pool: MAX 89. kernel_size: 2 90. stride: 2 91. } 92. } 93. layer {
94. name: \ 95. type: \ 96. bottom: \ 97. top: \ 98. } 99. layer {
100. name: \ 101. type: \ 102. bottom: \ 103. top: \ 104. param { 105. lr_mult: 1 106. } 107. param { 108. lr_mult: 2 109. }
110. convolution_param { 111. num_output: 50 112. kernel_size: 5 113. stride: 1 114. weight_filler { 115. type: \ 116. }
117. bias_filler { 118. type: \ 119. } 120. } 121. } 122. layer {
123. bottom: \ 124. top: \ 125. name: \ 126. type: \ 127. param {
128. lr_mult: 0 129. decay_mult: 0 130. } 131. param { 132. lr_mult: 0 133. decay_mult: 0 134. } 135. param { 136. lr_mult: 0 137. decay_mult: 0 138. } 139. } 140. layer {
141. bottom: \ 142. top: \ 143. name: \ 144. type: \ 145. scale_param { 146. bias_term: true 147. } 148. } 149. layer {
150. name: \ 151. type: \ 152. bottom: \ 153. top: \ 154. pooling_param { 155. pool: MAX 156. kernel_size: 2 157. stride: 2 158. } 159. } 160. layer {
161. name: \ 162. type: \ 163. bottom: \ 164. top: \ 165. } 166. layer { 167. name: \
168. type: \ 169. bottom: \ 170. top: \ 171. param {
172. lr_mult: 1 173. } 174. param { 175. lr_mult: 2 176. }
177. inner_product_param { 178. num_output: 500 179. weight_filler { 180. type: \ 181. }
182. bias_filler { 183. type: \ 184. } 185. } 186. } 187. layer {
188. name: \ 189. type: \ 190. bottom: \ 191. top: \ 192. } 193. layer { 194. name: \
195. type: \ 196. bottom: \ 197. top: \ 198. param { 199. lr_mult: 1 200. } 201. param { 202. lr_mult: 2 203. }
204. inner_product_param { 205. num_output: 10 206. weight_filler { 207. type: \ 208. }
209. bias_filler { 210. type: \ 211. } 212. } 213. } 214. layer {
215. name: \