0

Tensorflow .slim library implements vgg, but replaces the fully connected layers with convolutional ones. The code is at:

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/slim/python/slim/nets/vgg.py

So for example, fc8 layer is implemented as:

net = layers.conv2d(
      net,
      num_classes, [1, 1],
      activation_fn=None,
      normalizer_fn=None,
      scope='fc8')

which looks like a very different operation, with much fewer weights. What is the reason for this?

komark
  • 197
  • 1
  • 10
  • 1
    1x1 convolutions are the same as (misnamed) "fully-connected layers" in convolutional networks. See [How are 1x1 convolutions the same as a fully connected layer?](https://datascience.stackexchange.com/q/12830) – jdehesa Oct 18 '18 at 14:46
  • Thanks. The important part to me, from the answer in the link was: Note: 1×1 convolutions really are 1×1×number of channels of the input convolutions. – komark Oct 18 '18 at 15:13

0 Answers0