理解批量归一化参数模型输出

文奇聪明

我有以下型号 在此处输入图片说明

根据上图使用keras创建模型后,我有以下模型参数

在此处输入图片说明

我的问题是如何将批标准化 1 的参数设为 784。据我了解,批标准化有两个参数,由于我们有 196 个过滤器,我的理解是我们应该有 196 * 2 = 392,但模型输出显示为 784。我不明白这个值是怎么来的?请求提供有关我们如何获得此值的直觉?

Another question is how do we calculate for batch normalization for GRU units we got batch_normalization 2 got 512 parameters. To my understanding GRU has three non linear functions for update gate, relevance gate, and while calculating new cell value. so Here we should have 128 * 3 = 384, but model output as 512. How this value came here?

Thanks for your time and guidence.

Dr. Snoopy

The number of parameters for Batch Normalization is four times the number of input dimensions in the specified normalization axis (by default the last). This corresponds to the gamma and beta parameters, as well as the moving mean and moving variances. You can confirm this in the keras' source code.

要获得 784 BN 参数,您的维度为 784 / 4 = 196 个元素,对应于第一个 BN 层之前的层。对于 GRU 层,BN 有 128 个输入维度,需要 128 x 4 = 512 个参数。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章