import tensorflow as tf

        self.assertEqual(3, len(res))
        self.assertEqual((2, 5), res[0].shape)

        res = sess.run([mem])
        self.assertEqual((2, 2), res[0].c.shape)
        self.assertEqual((2, 2), res[0].h.shape)

        # Test with state_is_tuple=False.
        with tf.variable_scope("no_tuple"):
          cell = tf.nn.rnn_cell.BasicLSTMCell(2, state_is_tuple=False)
          dec, mem = tf.nn.seq2seq.embedding_attention_seq2seq(
              enc_inp, dec_inp, cell, num_encoder_symbols=2,
              num_decoder_symbols=5, embedding_size=2)
          sess.run([tf.global_variables_initializer()])
          res = sess.run(dec)
          self.assertEqual(3, len(res))
