我推荐我的硕士论文第 2.2.1 章作为答案。要添加到其余答案:
Keras 是您了解会发生什么的朋友:
from keras.models import Sequential
from keras.layers import Conv2D
model = Sequential()
model.add(Conv2D(32, input_shape=(28, 28, 3),
kernel_size=(5, 5),
padding='same',
use_bias=False))
model.add(Conv2D(17, (3, 3), padding='same', use_bias=False))
model.add(Conv2D(13, (3, 3), padding='same', use_bias=False))
model.add(Conv2D(7, (3, 3), padding='same', use_bias=False))
model.compile(loss='categorical_crossentropy', optimizer='adam')
print(model.summary())
给
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
conv2d_1 (Conv2D) (None, 28, 28, 32) 2400
_________________________________________________________________
conv2d_2 (Conv2D) (None, 28, 28, 17) 4896
_________________________________________________________________
conv2d_3 (Conv2D) (None, 28, 28, 13) 1989
_________________________________________________________________
conv2d_4 (Conv2D) (None, 28, 28, 7) 819
=================================================================
Total params: 10,104
尝试制定您的选择。如果是其他情况,这对参数意味着什么?
暗示:2400 = 32 ⋅ ( 3 ⋅ 5 ⋅ 5 )
这种方法还可以帮助您处理其他层类型,而不仅仅是卷积层。
另请注意,您可以自由实施不同的解决方案,这些解决方案可能具有其他数量的参数。