GRUCell提供了使用bias_initializer初始化偏差的选项,该偏置设置为“无”。但是,根据https://stackoverflow.com/a/43284391/7730199,默认值实际上不是'None',而是'glorot_uniform_initializer'。那个讨论发生在kernel_initializer的上下文中。这同样适用于GRUCell的bias_initializer吗?
此外,GRUCell中偏差的最佳初始化是什么?
答案 0 :(得分:0)
显然它是不变的:
def call(self, inputs, state):
"""Gated recurrent unit (GRU) with nunits cells."""
if self._gate_linear is None:
bias_ones = self._bias_initializer
if self._bias_initializer is None:
bias_ones = init_ops.constant_initializer(1.0, dtype=inputs.dtype)