[Caffe] Vgg interpretation of the image classification model of deep learning

Source: Internet
Author: User

First, Introduction

Vgg and googlenet are the double males of the 2014 Imagenet race, and the two types of model structures have a common feature of Go deeper. Unlike Googlenet, Vgg inherits some of the lenet and alexnet frameworks, especially the alexnet frame, Vgg is also a convolution of 5 group, 2-Layer FC image feature, a layer FC classification feature, Can be seen as a total of 8 part as alexnet. Based on the first 5 convolution group, the different configurations in each group, the VGG paper gives the A~e five configurations, and the convolution layer increments from 8 to 16. From the paper can be seen from 8 to 16 with the convolution layer of step-by-step deepening, seemingly through the deepening of the convolution layer has reached the bottleneck of accuracy increase. Some of the following papers study the pre-processing of convolutional layer inputs (such as batch normalization) and the post-processing of outputs (such as Prelu). What will be the direction of further ascension? This is worth thinking deeply about.


Second, network analysis

I have VGG_A network structure according to http://cs.stanford.edu/people/karpathy/vgg_train_val.prototxt configuration file and Vgg thesis guidance.

In the process of modification you will find that vgg in order to do different depth of the network between the comparison, and then not too much to modify the network, Vgg to all the convolution layer and the pool layer are set the same layer operation parameters, to ensure that each group out of shape is consistent, No matter how many layers of convolution you add to the convolution group.


Third, the network log

The following is the specific shape log:

i0701 17:01:10.548092 26739 data_layer.cpp:85] Output data size:100,3,224,224i0701 17:01:10.736845 26739 net.cpp:206] to P shape:100 3 224 224 (15052800) i0701 17:01:10.736912 26739 net.cpp:206] Top shape:100 (+) i0701 17:01:10.736929 26739 LAYER_FACTORY.HPP:75] Creating layer conv1_1i0701 17:01:10.736968 26739 net.cpp:166] Creating layer conv1_1i0701 17:01:10.736979 26739 net.cpp:496] conv1_1 <-datai0701 17:01:10.737004 26739 net.cpp:452] conv1_1-conv1_1i0701 1 7:01:10.737030 26739 net.cpp:197] Setting up conv1_1i0701 17:01:10.738733 26739 net.cpp:206] Top shape:100 64 224 224 (32 1126400) i0701 17:01:10.738770 26739 layer_factory.hpp:75] Creating layer relu1_1i0701 17:01:10.738786 26739 net.cpp:166 ] Creating layer relu1_1i0701 17:01:10.738824 26739 net.cpp:496] relu1_1 <-conv1_1i0701 17:01:10.738838 26739 net.cpp: 439] relu1_1, Conv1_1 (in-place) i0701 17:01:10.738853 26739 net.cpp:197] Setting up relu1_1i0701 17:01:10.738867 2673 9 net.cpp:206] Top shape:100 64 224224 (321126400) i0701 17:01:10.738878 26739 layer_factory.hpp:75] Creating layer pool1i0701 17:01:10.738890 26739 net.cpp : 166] Creating layer pool1i0701 17:01:10.738900 26739 net.cpp:496] pool1 <-conv1_1i0701 17:01:10.738914 26739 net.cpp: 452] pool1, pool1i0701 17:01:10.738930 26739 net.cpp:197] Setting up pool1i0701 17:01:10.738963 26739 net.cpp:206] to P shape:100 (80281600) i0701 17:01:10.738975 26739 layer_factory.hpp:75] Creating layer conv2_1i0701 17:01:10.7 38992 26739 net.cpp:166] Creating layer conv2_1i0701 17:01:10.739001 26739 net.cpp:496] conv2_1 <-pool1i0701 17:01:10. 739017 26739 net.cpp:452] conv2_1, conv2_1i0701 17:01:10.739030 26739 net.cpp:197] setting up conv2_1i0701 17:01:10.7 46640 26739 net.cpp:206] Top shape:100 (160563200) i0701 17:01:10.746669 26739 layer_factory.hpp:75] Creating Layer relu2_1i0701 17:01:10.746682 26739 net.cpp:166] Creating layer relu2_1i0701 17:01:10.746691 26739 net.cpp:496] Relu 2_1 <-conv2_1i0701 17:01:10.746702 26739 net.cpp:439] relu2_1, Conv2_1 (in-place) i0701 17:01:10.746714 26739 net.cpp:197] setting up Relu2_1 i0701 17:01:10.746726 26739 net.cpp:206] Top shape:100 (160563200) i0701 17:01:10.746734 26739 layer_factory.h PP:75] Creating layer pool2i0701 17:01:10.746749 26739 net.cpp:166] Creating layer pool2i0701 17:01:10.746759 26739 NET.CP P:496] pool2 <-conv2_1i0701 17:01:10.746770 26739 net.cpp:452] pool2, pool2i0701 17:01:10.746783 26739 net.cpp:19  7] Setting up pool2i0701 17:01:10.746798 26739 net.cpp:206] Top shape:100 (40140800) i0701 17:01:10.746809 26739 LAYER_FACTORY.HPP:75] Creating layer conv3_1i0701 17:01:10.746809 26739 layer_factory.hpp:75] Creating layer conv3_ 1i0701 17:01:10.746825 26739 net.cpp:166] Creating layer conv3_1i0701 17:01:10.746835 26739 net.cpp:496] conv3_1 <-poo l2i0701 17:01:10.746846 26739 net.cpp:452] conv3_1, conv3_1i0701 17:01:10.746860 26739 net.cpp:197] setting up conv3_ 1i0701 17:01:10.747910 26739 NET.CPP:206] Top shape:100 (80281600) i0701 17:01:10.747939 26739 layer_factory.hpp:75] Creating layer relu3_1i07 17:01:10.747954 26739 net.cpp:166] Creating layer relu3_1i0701 17:01:10.747963 26739 net.cpp:496] relu3_1 <-conv3_1  i0701 17:01:10.747974 26739 net.cpp:439] relu3_1, Conv3_1 (in-place) i0701 17:01:10.747985 26739 net.cpp:197] Setting Up relu3_1i0701 17:01:10.747997 26739 net.cpp:206] Top shape:100 (80281600) i0701 17:01:10.748009 26739 layer_f ACTORY.HPP:75] Creating layer conv3_2i0701 17:01:10.748021 26739 net.cpp:166] Creating layer conv3_2i0701 17:01:10.748030 26739 net.cpp:496] conv3_2 <-conv3_1i0701 17:01:10.748045 26739 net.cpp:452] Conv3_2-conv3_2i07 17:01:10.748060 26739 net.cpp:197] Setting up conv3_2i0701 17:01:10.750586 26739 net.cpp:206] Top shape:100 256 56 56 (80281600) i0701 17:01:10.750610 26739 layer_factory.hpp:75] Creating layer relu3_2i0701 17:01:10.750624 26739 net.cpp : 166] Creating layer relu3_2i0701 17:01:10.750626739 net.cpp:496] relu3_2 <-conv3_2i0701 17:01:10.750648 26739 net.cpp:439] relu3_2-conv3_2 (in-place) i0701 17:01:10.750669 26739 net.cpp:197] Setting up relu3_2i0701 17:01:10.750681 26739 net.cpp:206] Top shape:100 256 56 56 (80 281600) i0701 17:01:10.750690 26739 layer_factory.hpp:75] Creating layer pool3i0701 17:01:10.750702 26739 net.cpp:166] Creating layer pool3i0701 17:01:10.750710 26739 net.cpp:496] pool3 <-conv3_2i0701 17:01:10.750725 26739 net.cpp:452] P Ool3, pool3i0701 17:01:10.750740 26739 net.cpp:197] Setting up pool3i0701 17:01:10.750756 26739 net.cpp:206] Top Shap E:100 (20070400) i0701 17:01:10.750764 26739 layer_factory.hpp:75] Creating layer conv4_1i0701 17:01:10.750779 2  6739 net.cpp:166] Creating layer conv4_1i0701 17:01:10.750788 26739 net.cpp:496] conv4_1 <-pool3i0701 17:01:10.750800 26739 net.cpp:452] conv4_1, conv4_1i0701 17:01:10.750825 26739 net.cpp:197] setting up conv4_1i0701 17:01:10.756436 26739 net.cpp:206] Top shape: (40140800) i0701 17:01:10.756474 26739 layer_factory.hpp:75] Creating layer relu4_1i0701 17:01:10.756489 267  NET.CPP:166] Creating layer relu4_1i0701 17:01:10.756499 26739 net.cpp:496] relu4_1 <-conv4_1i0701 17:01:10.756510 26739 net.cpp:439] Relu4_1, Conv4_1 (in-place) i0701 17:01:10.756523 26739 net.cpp:197] setting up relu4_1i0701 17:01 : 10.756536 26739 net.cpp:206] Top shape:100 (40140800) i0701 17:01:10.756546 26739 layer_factory.hpp:75] Creatin G Layer conv4_2i0701 17:01:10.756559 26739 net.cpp:166] Creating layer conv4_2i0701 17:01:10.756568 26739 net.cpp:496] Con V4_2 <-conv4_1i0701 17:01:10.756583 26739 net.cpp:452] conv4_2 conv4_2i0701 17:01:10.756597 26739 net.cpp:197] s Etting up conv4_2i0701 17:01:10.766434 26739 net.cpp:206] Top shape:100 (40140800) i0701 17:01:10.766474 26739 L AYER_FACTORY.HPP:75] Creating layer relu4_2i0701 17:01:10.766490 26739 net.cpp:166] Creating layer relu4_2i0701 17:01:10.766500 26739 net.cpp:496]Relu4_2 <-conv4_2i0701 17:01:10.766513 26739 net.cpp:439] relu4_2 conv4_2 (in-place) i0701 17:01:10.766531 26739 NET.CPP:197] Setting up relu4_2i0701 17:01:10.766543 26739 net.cpp:206] Top shape:100 (40140800) i0701 17:01:10 .766552 26739 layer_factory.hpp:75] Creating layer pool4i0701 17:01:10.766573 26739 net.cpp:166] Creating layer pool4i070 1 17:01:10.766582 26739 net.cpp:496] pool4 <-conv4_2i0701 17:01:10.766595 26739 net.cpp:452] Pool4-pool4i0701 17 : 01:10.766608 26739 net.cpp:197] Setting up pool4i0701 17:01:10.766624 26739 net.cpp:206] Top shape:100 512 14 14 (100352 XX) I0701 17:18:56.158187 29940 layer_factory.hpp:75] Creating layer conv5_1i0701 17:18:56.158201 29940 net.cpp:166] Creating Layer conv5_1i0701 17:18:56.158210 29940 net.cpp:496] conv5_1 <-pool4i0701 17:18:56.158222 29940 net.cpp:452  ] Conv5_1, conv5_1i0701 17:18:56.158234 29940 net.cpp:197] Setting up conv5_1i0701 17:18:56.168265 29940 net.cpp:206] TOP shape:100 512 14 14 (100352XX) I0701 17:18:56.168303 29940 layer_factory.hpp:75] Creating layer relu5_1i0701 17:18:56.168320 29940 net.cpp:166] Creating Layer relu5_1i0701 17:18:56.168329 29940 net.cpp:496] relu5_1 <-conv5_1i0701 17:18:56.168341 29940 net.cpp:4  Relu5_1, Conv5_1 (in-place) I0701 17:18:56.168355 29940 net.cpp:197] Setting up relu5_1i0701 17:18:56.168368 29940 NET.CPP:206] Top shape:100 (10035200) I0701 17:18:56.168378 29940 layer_factory.hpp:75] Creating layer conv5_2i 0701 17:18:56.168395 29940 net.cpp:166] Creating Layer conv5_2i0701 17:18:56.168406 29940 net.cpp:496] Conv5_2 <-conv5 _1i0701 17:18:56.168417 29940 net.cpp:452] conv5_2, conv5_2i0701 17:18:56.168431 29940 net.cpp:197] Setting up conv5_ 2i0701 17:18:56.178441 29940 net.cpp:206] Top shape:100 (10035200) I0701 17:18:56.178478 29940 layer_factory.hpp : Creating layer relu5_2i0701 17:18:56.178493 29940 net.cpp:166] Creating layer relu5_2i0701 17:18:56.178501 29940 net. CPP:496] Relu5_2 <-conv5_2i0701 17:18:56.178514 29940 net.cpp:439] relu5_2, Conv5_2 (in-place) I0701 17:18:56.178527 29940 net.cpp:197] Setting u P relu5_2i0701 17:18:56.178539 29940 net.cpp:206] Top shape:100 (10035200) I0701 17:18:56.178547 29940 LAYER_FAC  TORY.HPP:75] Creating layer pool5i0701 17:18:56.178561 29940 net.cpp:166] Creating layer pool5i0701 17:18:56.178570 29940 NET.CPP:496] pool5 <-conv5_2i0701 17:18:56.178581 29940 net.cpp:452] pool5 pool5i0701 17:18:56.178596 29940 Net . cpp:197] Setting up pool5i0701 17:18:56.178611 29940 net.cpp:206] Top shape:100 7 7 (2508800) I0701 17:18:56.178621 2 9940 layer_factory.hpp:75] Creating layer fc6i0701 17:01:10.796613 26739 net.cpp:166] Creating layer fc6i0701 17:01:10.79 6622 26739 net.cpp:496] fc6 <-pool5i0701 17:01:10.796634 26739 net.cpp:452] fc6, fc6i0701 17:01:10.796650 26739 N  ET.CPP:197] Setting up fc6i0701 17:01:11.236284 26739 net.cpp:206] Top shape:100 4096 (409600) i0701 17:01:11.236351 26739 LAYER_FACTORY.HPP:75] Creating layer relu6i0701 17:01:11.236373 26739 net.cpp:166] Creating layer relu6i0701 17:01:11.236384 26739 net.cpp:496] Rel U6 <-fc6i0701 17:01:11.236404 26739 net.cpp:439] relu6 fc6 (in-place) i0701 17:01:11.236423 26739 net.cpp:197] se tting up relu6i0701 17:01:11.236435 26739 net.cpp:206] Top shape:100 4096 (409600) i0701 17:01:11.236444 26739 Layer_facto RY.HPP:75] Creating layer drop6i0701 17:01:11.236464 26739 net.cpp:166] Creating layer drop6i0701 17:01:11.236472 26739 NE T.CPP:496] DROP6 <-fc6i0701 17:01:11.236486 26739 net.cpp:439] DROP6-fc6 (in-place) i0701 17:01:11.236500 26739 N ET.CPP:197] Setting up drop6i0701 17:01:11.236524 26739 net.cpp:206] Top shape:100 4096 (409600) i0701 17:01:11.236534 267 LAYER_FACTORY.HPP:75] Creating layer fc7i0701 17:01:11.236549 26739 net.cpp:166] Creating layer fc7i0701 17:01:11.2365 26739 net.cpp:496] fc7 <-fc6i0701 17:01:11.236569 26739 net.cpp:452] fc7 fc7i0701 17:01:11.236585 26739 net.c PP:197] Setting up fc7i0717:01:11.301771 26739 net.cpp:206] Top shape:100 4096 (409600) i0701 17:01:11.301842 26739 layer_factory.hpp:75] Creati ng layer relu7i0701 17:01:11.301864 26739 net.cpp:166] Creating layer relu7i0701 17:01:11.301877 26739 net.cpp:496] Relu7 <-fc7i0701 17:01:11.301898 26739 net.cpp:439] relu7, Fc7 (in-place) i0701 17:01:11.301916 26739 net.cpp:197] Setti ng up relu7i0701 17:01:11.301929 26739 net.cpp:206] Top shape:100 4096 (409600) i0701 17:01:11.301939 26739 layer_factory. HPP:75] Creating layer drop7i0701 17:01:11.301954 26739 net.cpp:166] Creating layer drop7i0701 17:01:11.301962 26739 net.c PP:496] DROP7 <-fc7i0701 17:01:11.301972 26739 net.cpp:439] drop7, Fc7 (in-place) i0701 17:01:11.301985 26739 net. CPP:197] Setting up drop7i0701 17:01:11.302000 26739 net.cpp:206] Top shape:100 4096 (409600) i0701 17:01:11.302008 26739 LAYER_FACTORY.HPP:75] Creating layer fc8i0701 17:01:11.302023 26739 net.cpp:166] Creating layer fc8i0701 17:01:11.302032 26739 net.cpp:496] Fc8 &Lt;-fc7i0701 17:01:11.302044 26739 net.cpp:452] fc8, fc8i0701 17:01:11.302058 26739 net.cpp:197] setting up fc8i0701 17:01:11.464764 26739 net.cpp:206] Top shape:100 10000 (1000000)


Shape calculation method can be referred to [Caffe] deep learning of the image classification model alexnet interpretation.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

[Caffe] Vgg interpretation of the image classification model of deep learning

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.