diff options
author | 2016-12-14 23:45:28 -0800 | |
---|---|---|
committer | 2016-12-15 00:04:59 -0800 | |
commit | c5dc750ba9fab7e7f1f05ee0e0cdb04ae96e0e32 (patch) | |
tree | 937edf17553f8d1f24abaf683dc83b10e7e730f4 /tensorflow/contrib/rnn/python/ops/lstm_ops.py | |
parent | 3bb102941e638617894facca6859b444154f8c2b (diff) |
Switch array_ops.pack/unpack to array_ops.stack/unstack. Also switch a few remaining references to tf.pack/unpack to tf.stack/unstack.
Change: 142108785
Diffstat (limited to 'tensorflow/contrib/rnn/python/ops/lstm_ops.py')
-rw-r--r-- | tensorflow/contrib/rnn/python/ops/lstm_ops.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/contrib/rnn/python/ops/lstm_ops.py b/tensorflow/contrib/rnn/python/ops/lstm_ops.py index 4ad269ab4f..875d5e860f 100644 --- a/tensorflow/contrib/rnn/python/ops/lstm_ops.py +++ b/tensorflow/contrib/rnn/python/ops/lstm_ops.py @@ -206,7 +206,7 @@ def _block_lstm(seq_len_max, # pylint: disable=protected-access i, cs, f, o, ci, co, h = _lstm_ops_so.block_lstm( seq_len_max=seq_len_max, - x=array_ops.pack(x), + x=array_ops.stack(x), cs_prev=cs_prev, h_prev=h_prev, w=w, @@ -480,7 +480,7 @@ class LSTMBlockWrapper(fused_rnn_cell.FusedRNNCell): with vs.variable_scope(scope or "lstm_block_wrapper"): is_list = isinstance(inputs, list) if is_list: - inputs = array_ops.pack(inputs) + inputs = array_ops.stack(inputs) inputs_shape = inputs.get_shape().with_rank(3) if not inputs_shape[2]: raise ValueError("Expecting inputs_shape[2] to be set: %s" % @@ -498,7 +498,7 @@ class LSTMBlockWrapper(fused_rnn_cell.FusedRNNCell): raise ValueError( "Either initial_state or dtype needs to be specified") z = array_ops.zeros( - array_ops.pack([batch_size, self.num_units]), dtype=dtype) + array_ops.stack([batch_size, self.num_units]), dtype=dtype) initial_state = z, z else: if len(initial_state) != 2: |