Computation and memory requirement analysis of classical CNN model

Table 1 Comparison of memory, computation amount and parameter number of CNN classical model

  AlexNet VGG16 Inception-v3
Model memory (MB) > 200 > 500 90-100.
Parameters (millions) 60 138 23.2
Calculations (millions) 720 15300 5000

 

1. Specific analysis of CNN model (Taking AlexNet network model as an example)

1.1 Network Structure

 

 

Figure 1 AlexNet network structure

 

AlexNet has 5 convolution layers and 3 full connection layers

C1:96×11×11×3 (number of convolution kernels/width/height/depth) 34848

C2:256×5×5×48 (number of convolution kernels/width/height/depth) 307200

C3:384×3×3×256 (number of convolution kernels/width/height/depth) 884736

C4:384×3×3×192 (number of convolution kernels/width/height/depth) 663552

C5:256×3×3×192 (number of convolution kernels/width/height/depth) 442368

R1:4096×6×6×256 (number of convolution kernels/width/height/depth) 37748736

R2:4096×4096 16777216

R3:4096 x 1000 4096000

There are 60 million parameters

 

1.2 AlexNet model memory size calculation

60 million (parameters) x 32 bits (float32)= 1.92 billion bits ≈228.88MB

 

1.3 AlexNet model calculates force consumption

Figure 2 Number of floating point operations per second and number of parameters in each layer of AlexNet model

 

1.4 AlexNet network model Configuration

The AlexNet network model won the ImageNet competition in 2012. AlexNet uses two GTX580 graphics cards for training, and two Gpus each train part of the network. Only in the second convolution layer and the full connection layer can two Gpus communicate with each other.