VGG-16 prototxt

标签: CNNcaffe
2016-10-02 14:18 961人阅读 评论(6) 收藏 举报
本文章已收录于:
分类:
caffe(15)

作者同类文章X

CNN(31)

作者同类文章X

版权声明:可以参考 亦可转载 请注明出处

solver.prototxt:

[cpp] view plaincopyprint?
  1. net: "models/vgg16/train_val.prototxt"
  2. test_iter: 1000
  3. test_interval: 2500
  4. base_lr: 0.001
  5. lr_policy: "step"
  6. gamma: 0.1
  7. stepsize: 50000
  8. display: 20
  9. max_iter: 200000
  10. momentum: 0.9
  11. weight_decay: 0.0005
  12. snapshot: 10000
  13. snapshot_prefix: "models/vgg16/caffe_vgg16_train"
  14. solver_mode: GPU

net: "models/vgg16/train_val.prototxt"
test_iter: 1000
test_interval: 2500
base_lr: 0.001
lr_policy: "step"
gamma: 0.1
stepsize: 50000
display: 20
max_iter: 200000
momentum: 0.9
weight_decay: 0.0005
snapshot: 10000
snapshot_prefix: "models/vgg16/caffe_vgg16_train"
solver_mode: GPU

train_val.prototxt:

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

VGG-16 prototxt相关推荐

  1. pytorch笔记:VGG 16

    理论部分见:机器学习笔记:VGG 16_UQI-LIUWJ的博客-CSDN博客 1 直接调用 import torch, torchvisionmodel = torchvision.models.v ...

  2. vgg 16模型的内存和参数量的计算

    cs231n上关于VGG-16模型的内存和参数的计算过程如下. INPUT: [224x224x3] memory: 224*224*3=150K weights: 0 CONV3-64: [224x ...

  3. 使用VGG训练Imagenet

    准备数据 具体官网地址,请点击这里 ImageNet官网 训练数据集:ILSVRC2012_img_train.tar 验证数据集:ILSVRC2012_img_val.tar 数据解压 sudo t ...

  4. tensorflow文档中vgg.py解读

    文档地址: https://github.com/tensorflow/models/blob/master/research/slim/nets/vgg.py vgg 网络结构表: 注:ABCDE ...

  5. 22 款神经网络的设计和可视化工具

    前言 深度学习领域,最常见的就是各种网络模型,那么在写论文或者文章,介绍网络模型的时候,最好的办法当然就是展示代码画图,今天介绍的 Github 项目,就是整理了 22 个设计和可视化网络结构的工具, ...

  6. caffe-fast-rcnn(Caffe、FSRCNN、FastRCNN)

    作者:forest_world 转载请注明:http://blog.csdn.net/forest_world 一.文件架构 二.FSRCNN开发环境搭建: faster-rcnn: matlab版本 ...

  7. 22 款设计和可视化神经网络的工具

    点击上方"算法猿的成长",关注公众号,选择加"星标"或"置顶" 总第 143 篇文章,本文大约 3000 字,阅读大约需要 10 分钟 前言 ...

  8. 深度神经网络可视化工具

    TensorBoard:TensorFlow集成可视化工具 GitHub官方项目:https://github.com/tensorflow/tensorflow/tree/master/tensor ...

  9. TensorFlow Frontend前端

    TensorFlow Frontend前端 TensorFlow前端有助于将TensorFlow模型导入TVM. Supported versions: • 1.12 and below Tested ...

  10. 优达学城《DeepLearning》项目2:犬种分类器

    在这个notebook中,你将迈出第一步,来开发可以作为移动端或 Web应用程序一部分的算法.在这个项目的最后,你的程序将能够把用户提供的任何一个图像作为输入.如果可以从图像中检测到一只狗,它会输出对 ...

最新文章

  1. 2022-2028年中国工业节能行业深度调研及投资前景预测报告
  2. Cpp / shared_ptr
  3. NYOJ_269_VF
  4. python自动化测试脚本后端_基于 python 的接口自动化测试
  5. Scala _09样例类(case classes)隐式转换
  6. python笔记之 inputprintformat函数
  7. MC.9 与 LIS
  8. hokuyo_node代码分析
  9. C# 静态类初始化 结构体初始化
  10. 数据挖掘案例(1):泰坦尼克号-数据挖掘流程
  11. Qt 之 QPainter
  12. Selenium批量下载抖音无水印高清视频
  13. HttpClient RestTemplate
  14. 神经网络学习笔记1——BP神经网络原理到编程实现(matlab,python)
  15. 使用微信js-sdk上传语音并将语音下载到服务器
  16. 18行的python快递查询
  17. 敲一万小时的代码可以成为大牛吗?
  18. 【2022年华为杯数学建模E题赛后总结加思路详细介绍配代码----10月11号写的总结】
  19. 论作业成本法在中小酒店的应用中存在的问题及对策
  20. 做软件第三方测试报告需要准备哪些材料,靠谱的软件测试中心推荐

热门文章

  1. android原生组件,XUI: 一个简洁而优雅的Android原生UI框架,解放你的双手!
  2. java 内存_java节省内存的几条建议
  3. tf.argsort
  4. linux 可执行文件_linux中ELF二进制程序解析
  5. tcp转串口_浅谈串口转以太网技术
  6. 推荐系统笔记:基于模型的协同过滤
  7. 文巾解题 557. 反转字符串中的单词 III
  8. MATLAB实战系列(四)-导入txt文件技巧大全
  9. 阿里数据中台系列之Apsara Stack控制台初始化配置及资源管理(二)
  10. 强化学习(十二) Dueling DQN