# Bottleneck building block in Residual learning networks

I am wondering about how 1x1 convolution can be used to change the dimensionality of feature maps in a residual learning network.

Here the top 1x1 convolution changes the feature map size from 256 to 64. How is this possible?

In a previous post explaining 1x1 convolution in neural net, it is mentioned that, if a layer having $n_1$ feature maps is subjected to 1x1 convolution with $n_2$ filters then number of feature map changes to $n_2$. Shouldn't it be $n_1$$n_2 since each of the n_2 filters produce one output corresponding to each of the n_1 inputs. Also how does one generate 256 feature maps from 64, as done in the bottom layer. ## 1 Answer There's only one parameter for each input map in a 1*1 filter, actually the 1*1 convolution is multiplying the every element of an input map by the same scalar. So it is similar to getting 265 linear combinations out of 64 variables, the n-th feature map y_n is like,$$y_n=f(w_{n,1}x_1+w_{n,2}x_2+...+w_{n,64}x_{64})$$so actually we can get any number of output feature maps as we want. Of course if the output dimension is greater than the input dimension, the output would be redundant. • What is$w^n_i$?. Is it just$w_i$– Newstein Jul 1 '16 at 9:50 • @Newstein It's meant to be in accordance with the subscript of$y_n\$, so you have a different set of weights for different output channels. – dontloo Jul 1 '16 at 9:53
• @Newstein I made that up, it's not in the paper. :P – dontloo Jul 1 '16 at 9:54
• @Newstein yes by weights I mean the single parameter in a 1x1 filter, and there're not in total 64 filters, there are 64 output channels (or feature maps), which means there'll be 64*256 filters (you apply a different filter to each input channel, add up the results and apply an activation function to get the output of one channel) – dontloo Jul 1 '16 at 10:37
• @facuq yea it is, I've made some edit – dontloo Feb 9 '18 at 3:59