aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/legacy_seq2seq
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-01-10 18:21:29 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-01-10 18:46:37 -0800
commit0e226af7eed5e2764aa8acb825af4cd3e06d2452 (patch)
tree895fd53e8292ef7aff8832a9d8e601977d662526 /tensorflow/contrib/legacy_seq2seq
parent1255a177c9bdfc073563f5baa39bd3f77577276b (diff)
Switch tf.concat_v2 references in third_party/tensorflow to tf.concat.
Change: 144153795
Diffstat (limited to 'tensorflow/contrib/legacy_seq2seq')
-rw-r--r--tensorflow/contrib/legacy_seq2seq/python/kernel_tests/seq2seq_test.py14
-rw-r--r--tensorflow/contrib/legacy_seq2seq/python/ops/seq2seq.py4
2 files changed, 9 insertions, 9 deletions
diff --git a/tensorflow/contrib/legacy_seq2seq/python/kernel_tests/seq2seq_test.py b/tensorflow/contrib/legacy_seq2seq/python/kernel_tests/seq2seq_test.py
index 993ce87211..041cc6bf82 100644
--- a/tensorflow/contrib/legacy_seq2seq/python/kernel_tests/seq2seq_test.py
+++ b/tensorflow/contrib/legacy_seq2seq/python/kernel_tests/seq2seq_test.py
@@ -325,7 +325,7 @@ class Seq2SeqTest(test.TestCase):
inp = [constant_op.constant(0.5, shape=[2, 2])] * 2
enc_outputs, enc_state = core_rnn.static_rnn(
cell, inp, dtype=dtypes.float32)
- attn_states = array_ops.concat_v2([
+ attn_states = array_ops.concat([
array_ops.reshape(e, [-1, 1, cell.output_size]) for e in enc_outputs
], 1)
dec_inp = [constant_op.constant(0.4, shape=[2, 2])] * 3
@@ -347,7 +347,7 @@ class Seq2SeqTest(test.TestCase):
inp = [constant_op.constant(0.5, shape=[2, 2])] * 2
enc_outputs, enc_state = core_rnn.static_rnn(
cell, inp, dtype=dtypes.float32)
- attn_states = array_ops.concat_v2([
+ attn_states = array_ops.concat([
array_ops.reshape(e, [-1, 1, cell.output_size]) for e in enc_outputs
], 1)
dec_inp = [constant_op.constant(0.4, shape=[2, 2])] * 3
@@ -411,7 +411,7 @@ class Seq2SeqTest(test.TestCase):
inp = [constant_op.constant(0.5, shape=[2, 2])] * 2
enc_outputs, enc_state = core_rnn.static_rnn(
cell, inp, dtype=dtypes.float32)
- attn_states = array_ops.concat_v2([
+ attn_states = array_ops.concat([
array_ops.reshape(e, [-1, 1, cell.output_size]) for e in enc_outputs
], 1)
dec_inp = [constant_op.constant(0.4, shape=[2, 2])] * 3
@@ -439,9 +439,9 @@ class Seq2SeqTest(test.TestCase):
inp = constant_op.constant(0.5, shape=[2, 2, 2])
enc_outputs, enc_state = core_rnn.static_rnn(
cell, inp, dtype=dtypes.float32)
- attn_states = array_ops.concat_v2([
- array_ops.reshape(e, [-1, 1, cell.output_size]) for e in
- enc_outputs
+ attn_states = array_ops.concat([
+ array_ops.reshape(e, [-1, 1, cell.output_size])
+ for e in enc_outputs
], 1)
dec_inp = [constant_op.constant(0.4, shape=[2, 2])] * 3
dec, mem = seq2seq_lib.attention_decoder(
@@ -466,7 +466,7 @@ class Seq2SeqTest(test.TestCase):
cell = core_rnn_cell_impl.GRUCell(2)
enc_outputs, enc_state = core_rnn.static_rnn(
cell, inp, dtype=dtypes.float32)
- attn_states = array_ops.concat_v2([
+ attn_states = array_ops.concat([
array_ops.reshape(e, [-1, 1, cell.output_size]) for e in enc_outputs
], 1)
dec_inp = [
diff --git a/tensorflow/contrib/legacy_seq2seq/python/ops/seq2seq.py b/tensorflow/contrib/legacy_seq2seq/python/ops/seq2seq.py
index 9ca66fcd5d..bc36e9dced 100644
--- a/tensorflow/contrib/legacy_seq2seq/python/ops/seq2seq.py
+++ b/tensorflow/contrib/legacy_seq2seq/python/ops/seq2seq.py
@@ -639,7 +639,7 @@ def attention_decoder(decoder_inputs,
ndims = q.get_shape().ndims
if ndims:
assert ndims == 2
- query = array_ops.concat_v2(query_list, 1)
+ query = array_ops.concat(query_list, 1)
for a in xrange(num_heads):
with variable_scope.variable_scope("Attention_%d" % a):
y = linear(query, attention_vec_size, True)
@@ -853,7 +853,7 @@ def embedding_attention_seq2seq(encoder_inputs,
top_states = [
array_ops.reshape(e, [-1, 1, cell.output_size]) for e in encoder_outputs
]
- attention_states = array_ops.concat_v2(top_states, 1)
+ attention_states = array_ops.concat(top_states, 1)
# Decoder.
output_size = None