Skip to content

Commit f600cbe

Browse files
committed
fix gru weights bug
1 parent efeed3e commit f600cbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tensorlayerx/backend/ops/tensorflow_nn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2141,7 +2141,7 @@ def __call__(self, input, h):
21412141
h_r, h_z, h_c = tf.split(h_gates, num_or_size_splits=3, axis=-1)
21422142

21432143
r = self.gate_act_fn(x_r + h_r)
2144-
z = self.gate_act_fn(x_r + h_z)
2144+
z = self.gate_act_fn(x_z + h_z)
21452145
c = self.act_fn(x_c + r * h_c)
21462146
h = (h - c) * z + c
21472147

0 commit comments

Comments
 (0)