sandy_wyat asked . 2021-07-08

Why does AlexNet have non-scalar values for

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?
 

neural net , alexnet , convolution , convolutional , deep learning , alex net

Expert Answer

John Michell answered . 2024-11-12 00:50:28

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, the weights are split into two groups of 128 filters. Each filter has 48 channels. The input to the layer has 96 channels, but it gets split into two sections with 48 channels each. Each group of filters is applied to a different section, to produce two outputs with 128 channels each. These two outputs are then concatenated together to give a final output with 256 channels.


Not satisfied with the answer ?? ASK NOW

Frequently Asked Questions

MATLAB offers tools for real-time AI applications, including Simulink for modeling and simulation. It can be used for developing algorithms and control systems for autonomous vehicles, robots, and other real-time AI systems.

MATLAB Online™ provides access to MATLAB® from your web browser. With MATLAB Online, your files are stored on MATLAB Drive™ and are available wherever you go. MATLAB Drive Connector synchronizes your files between your computers and MATLAB Online, providing offline access and eliminating the need to manually upload or download files. You can also run your files from the convenience of your smartphone or tablet by connecting to MathWorks® Cloud through the MATLAB Mobile™ app.

Yes, MATLAB provides tools and frameworks for deep learning, including the Deep Learning Toolbox. You can use MATLAB for tasks like building and training neural networks, image classification, and natural language processing.

MATLAB and Python are both popular choices for AI development. MATLAB is known for its ease of use in mathematical computations and its extensive toolbox for AI and machine learning. Python, on the other hand, has a vast ecosystem of libraries like TensorFlow and PyTorch. The choice depends on your preferences and project requirements.

You can find support, discussion forums, and a community of MATLAB users on the MATLAB website, Matlansolutions forums, and other AI-related online communities. Remember that MATLAB's capabilities in AI and machine learning continue to evolve, so staying updated with the latest features and resources is essential for effective AI development using MATLAB.

Without any hesitation the answer to this question is NO. The service we offer is 100% legal, legitimate and won't make you a cheater. Read and discover exactly what an essay writing service is and how when used correctly, is a valuable teaching aid and no more akin to cheating than a tutor's 'model essay' or the many published essay guides available from your local book shop. You should use the work as a reference and should not hand over the exact copy of it.

Matlabsolutions.com provides guaranteed satisfaction with a commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been empanelled after extensive research and quality check.

Matlabsolutions.com provides undivided attention to each Matlab assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work done at the best price in industry.