Skip to content

Commit 4f8ea46

Browse files
committed
state_is_tuple=True: Fix training on 0.12
1 parent 64f1e04 commit 4f8ea46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ def __init__(self, args, infer=False): # infer is set to true during sampling.
2424

2525
# Call tensorflow library tensorflow-master/tensorflow/python/ops/rnn_cell
2626
# to create a layer of rnn_size cells of the specified basic type (RNN/GRU/LSTM).
27-
cell = cell_fn(args.rnn_size)
27+
cell = cell_fn(args.rnn_size, state_is_tuple=True)
2828

2929
# Use the same rnn_cell library to create a stack of these cells
3030
# of num_layers layers. Pass in a python list of these cells.
3131
# (The [cell] * arg.num_layers syntax literally duplicates cell multiple times in
3232
# a list. The syntax is such that [5, 6] * 3 would return [5, 6, 5, 6, 5, 6].)
33-
self.cell = cell = rnn_cell.MultiRNNCell([cell] * args.num_layers)
33+
self.cell = cell = rnn_cell.MultiRNNCell([cell] * args.num_layers, state_is_tuple=True)
3434

3535
# Create two TF placeholder nodes of 32-bit ints (NOT floats!),
3636
# each of shape batch_size x seq_length. This shape matches the batches

0 commit comments

Comments
 (0)