1x1 convolution vs densely connected layer

I’ve noticed that fastai implementations of fully convolutional networks like Resnet end in a linear fully-connected layer. Other implementations end with 1x1 convolution layers. Are these the same thing?

Andrew Ng’s Coursera Deep Learning Specialization has a video called “Networks in Networks and 1x1 Convolutions”, he suggests that they are the same thing.

1 Like

Yes, they are the same. You can use this simple code to convert 1x1conv to a fc layer:https://cyand.github.io/2020/08/24/1x1-conv-is-fc/