From 01862069cc237b70f91e8f588fd821075b6b4633 Mon Sep 17 00:00:00 2001 From: Dusan Varis Date: Tue, 21 Nov 2017 13:53:00 +0100 Subject: [PATCH] nematus cell is child of grucell not orthogrucell --- neuralmonkey/nn/ortho_gru_cell.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/neuralmonkey/nn/ortho_gru_cell.py b/neuralmonkey/nn/ortho_gru_cell.py index db88fb944..4e74f8823 100644 --- a/neuralmonkey/nn/ortho_gru_cell.py +++ b/neuralmonkey/nn/ortho_gru_cell.py @@ -19,7 +19,7 @@ def __call__(self, inputs, state, scope="OrthoGRUCell"): # Note that tensorflow does not like when the type annotations are present. -class NematusGRUCell(OrthoGRUCell): +class NematusGRUCell(tf.contrib.rnn.GRUCell): """Nematus implementation of gated recurrent unit cell. The main difference is the order in which the gating functions and linear @@ -28,11 +28,12 @@ class NematusGRUCell(OrthoGRUCell): The math is equivalent, in practice there are differences due to float precision errors. """ + def __init__(self, rnn_size, use_state_bias=False, use_input_bias=True): self.use_state_bias = use_state_bias self.use_input_bias = use_input_bias - OrthoGRUCell.__init__(self, rnn_size) + tf.contrib.rnn.GRUCell.__init__(self, rnn_size) def call(self, inputs, state): """Gated recurrent unit (GRU) with nunits cells."""