Skip to content

Commit

Permalink
Change the state_is_tuple default to True for the remaining 3 cells: …
Browse files Browse the repository at this point in the history
…CoupledInputForgetGateLSTMCell, GridLSTMCell and AttentionCellWrapper.

Change: 152086191
  • Loading branch information
tensorflower-gardener committed Apr 4, 2017
1 parent 7a825ba commit c3d9905
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def testCoupledInputForgetGateLSTMCell(self):
x = array_ops.zeros([batch_size, input_size])
m = array_ops.zeros([batch_size, state_size])
output, state = rnn_cell.CoupledInputForgetGateLSTMCell(
num_units=num_units, forget_bias=1.0)(x, m)
num_units=num_units, forget_bias=1.0, state_is_tuple=False)(x, m)
sess.run([variables.global_variables_initializer()])
res = sess.run([output, state], {
x.name:
Expand Down
6 changes: 3 additions & 3 deletions tensorflow/contrib/rnn/python/ops/rnn_cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class CoupledInputForgetGateLSTMCell(core_rnn_cell.RNNCell):
def __init__(self, num_units, use_peepholes=False,
initializer=None, num_proj=None, proj_clip=None,
num_unit_shards=1, num_proj_shards=1,
forget_bias=1.0, state_is_tuple=False,
forget_bias=1.0, state_is_tuple=True,
activation=math_ops.tanh, reuse=None):
"""Initialize the parameters for an LSTM cell.
Expand Down Expand Up @@ -457,7 +457,7 @@ def __init__(self, num_units, use_peepholes=False,
start_freqindex_list=None,
end_freqindex_list=None,
couple_input_forget_gates=False,
state_is_tuple=False,
state_is_tuple=True,
reuse=None):
"""Initialize the parameters for an LSTM cell.
Expand Down Expand Up @@ -1043,7 +1043,7 @@ class AttentionCellWrapper(core_rnn_cell.RNNCell):
"""

def __init__(self, cell, attn_length, attn_size=None, attn_vec_size=None,
input_size=None, state_is_tuple=False, reuse=None):
input_size=None, state_is_tuple=True, reuse=None):
"""Create a cell with attention.
Args:
Expand Down

0 comments on commit c3d9905

Please sign in to comment.