import tensorflow as tf

        sess.run([tf.global_variables_initializer()])
        res = sess.run(dec)
        self.assertEqual(3, len(res))
        self.assertEqual((2, 2), res[0].shape)

        # Test that previous-feeding model ignores inputs after the first.
        dec_inp2 = [tf.constant(0, tf.int32, shape=[2]) for _ in range(3)]
        with tf.variable_scope("other"):
          d3, _ = tf.nn.seq2seq.embedding_attention_seq2seq(
              enc_inp, dec_inp2, cell, num_encoder_symbols=2,
              num_decoder_symbols=5, embedding_size=2,
              feed_previous=tf.constant(True))
