我很难理解层归一化。比如说我在Tensorflow中训练了一个模型,当我查看图中的变量时,得到以下结果:
<tf.Variable 'actor/dense/kernel:0' shape=(5, 64) dtype=float32_ref>,
<tf.Variable 'actor/dense/bias:0' shape=(64,) dtype=float32_ref>,
<tf.Variable 'actor/LayerNorm/beta:0' shape=(64,) dtype=float32_ref>,
<tf.Variable 'actor/LayerNorm/gamma:0' shape=(64,) type=float32_ref>,
<tf.Variable 'actor/dense_1/kernel:0' shape=(64, 64) dtype=float32_ref>,
<tf.Variable 'actor/dense_1/bias:0' shape=(64,) dtype=float32_ref>,
<tf.Variable 'actor/LayerNorm_1/beta:0' shape=(64,) dtype=float32_ref>,
<tf.Variable 'actor/LayerNorm_1/gamma:0' shape=(64,) dtype=float32_ref>
<tf.Variable 'actor/dense_2/kernel:0' shape=(64, 1) dtype=float32_ref>,
<tf.Variable 'actor/dense_2/bias:0' shape=(1,) dtype=float32_ref>
正如您所看到的,这是一个具有每层层归一化的两层全连接网络。
因此,我知道偏差被添加到节点输入中。actor / LayerNorm / beta:0,actor / LayerNorm / gamma:0等变量是否以相同方式工作?我可以将一个层的偏置、beta和gamma值总结为一个“偏置”向量吗?或者这是完全不同的机制?
预先感谢!