Skip to content

Commit 0186206

Browse files
committed
nematus cell is child of grucell not orthogrucell
1 parent 1f68eb5 commit 0186206

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

neuralmonkey/nn/ortho_gru_cell.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def __call__(self, inputs, state, scope="OrthoGRUCell"):
1919

2020

2121
# Note that tensorflow does not like when the type annotations are present.
22-
class NematusGRUCell(OrthoGRUCell):
22+
class NematusGRUCell(tf.contrib.rnn.GRUCell):
2323
"""Nematus implementation of gated recurrent unit cell.
2424
2525
The main difference is the order in which the gating functions and linear
@@ -28,11 +28,12 @@ class NematusGRUCell(OrthoGRUCell):
2828
The math is equivalent, in practice there are differences due to float
2929
precision errors.
3030
"""
31+
3132
def __init__(self, rnn_size, use_state_bias=False, use_input_bias=True):
3233
self.use_state_bias = use_state_bias
3334
self.use_input_bias = use_input_bias
3435

35-
OrthoGRUCell.__init__(self, rnn_size)
36+
tf.contrib.rnn.GRUCell.__init__(self, rnn_size)
3637

3738
def call(self, inputs, state):
3839
"""Gated recurrent unit (GRU) with nunits cells."""

0 commit comments

Comments
 (0)