Why does AlexNet have non-scalar values for

Technical Source
2 min readJul 8, 2021

--

Why does AlexNet have non-scalar values for NumChannels and NumFilters in some convolutional layers?

Take the layers ‘conv1’ and ‘conv2’ for example. ‘conv1’ has 3 channels and 96 filters; that’s fine. It should follow that ‘conv2’ has 96 channels, but instead what I find is the following:

  • conv2.NumChannels = [48 48]
  • conv2.Weights has the following form: [5×5×48×256 single]

The total of the elements in conv2.NumChannels is the required 96, but why is this split into 2 48s?

The conv2.Weights property suggests that there are only 48 channels, not the required 96. Are half the filters in ‘conv1’ redundant as a result?

It is impossible to construct a Convolution2DLayer with a 2-element NumChannels, so how did this happen?

From here the confusion continues because conv2.NumFilters = [128 128]. The total is 256, which is the correct number of filters, and is consistent with the conv.2.Weights property written above. But again, why is this split across 2 elements? And how did this happen given that it is impossible to construct a Convolution2DLayer with a non-scaler NumFilters property?

ANSWER

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

In AlexNet, certain convolutional layers use “filter groups”. In these layers, the filters are split into two groups. The input to a layer with “filter groups” is split into two sections along the channel dimension, and then each “filter group” is applied to a different section. The two resulting sections are then concatenated together to produce the output. This may seem convoluted, but this was done in the original implementation of AlexNet to make it easier to split the network between two GPUs for training.

So for the second convolutional layer in AlexNet,

SEE COMPLETE ANSWER CLICK THE LINK

--

--

Technical Source
Technical Source

Written by Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

No responses yet