如何计算单个CNN层中的权重和偏差值?

问题描述 投票:0回答:1

给出下图,如何计算参数数量:

CNN Layer

此特定层由4x4卷积和64个特征图组成;如何完成满足最初问题的计算?

Update - Full Architecture

machine-learning neural-network conv-neural-network feature-extraction
1个回答
0
投票

过滤器大小包含N * kernel_size * kernel_size权重参数,每个通道一个,所以

N * kernel_size * kernel_size* n_channels然后N bais parmaters,所以该层的最终cacluation为n_params = N * kernel_size * kernel_size* n_channels + N


N : number of features

kernel_size : is conv2d shape (height and width)

n_channels : is the number of channels

n_params : is the total number of your parameters

Ex

n_params = 64 * (4 * 4) * 3 + 64 = 3136

© www.soinside.com 2019 - 2024. All rights reserved.