Skip to content

Commit

Permalink
Adding version check
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeongtae committed Aug 14, 2018
1 parent 5974716 commit 75b5704
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tacotron/models/custom_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ def __init__(self, cell, helper, initial_state, output_layer=None):
Raises:
TypeError: if `cell`, `helper` or `output_layer` have an incorrect type.
"""
rnn_cell_impl.assert_like_rnncell(type(cell), cell)
if (tf.__version__ < '1.10'):
if not rnn_cell_impl._like_rnncell(cell): # pylint: disable=protected-access
raise TypeError("cell must be an RNNCell, received: %s" % type(cell))
else:
rnn_cell_impl.assert_like_rnncell(type(cell), cell)
if not isinstance(helper, helper_py.Helper):
raise TypeError("helper must be a Helper, received: %s" % type(helper))
if (output_layer is not None
Expand Down

0 comments on commit 75b5704

Please sign in to comment.