How to calculate the number of parameters for convolutional neural network?

前端 未结 2 979
被撕碎了的回忆
被撕碎了的回忆 2020-11-28 00:46

I\'m using Lasagne to create a CNN for the MNIST dataset. I\'m following closely to this example: Convolutional Neural Networks and Feature Extraction with Python.

T

2条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-28 01:27

    building on top of @hbaderts's excellent reply, just came up with some formula for a I-C-P-C-P-H-O network (since i was working on a similar problem), sharing it in the figure below, may be helpful.

    Also, (1) convolution layer with 2x2 stride and (2) convolution layer 1x1 stride + (max/avg) pooling with 2x2 stride, each contributes same numbers of parameters with 'same' padding, as can be seen below:

提交回复
热议问题