import tensorflow as tf

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

  def testEmbeddingRNNDecoder(self):
    with self.test_session() as sess:
      with tf.variable_scope("root", initializer=tf.constant_initializer(0.5)):
        inp = [tf.constant(0.5, shape=[2, 2])] * 2
        cell = tf.nn.rnn_cell.BasicLSTMCell(2, state_is_tuple=True)
        _, enc_state = tf.nn.rnn(cell, inp, dtype=tf.float32)
        dec_inp = [tf.constant(i, tf.int32, shape=[2]) for i in range(3)]
        dec, mem = tf.nn.seq2seq.embedding_rnn_decoder(
            dec_inp, enc_state, cell, num_symbols=4, embedding_size=2)
        sess.run([tf.global_variables_initializer()])
        res = sess.run(dec)
        self.assertEqual(3, len(res))
        self.assertEqual((2, 2), res[0].shape)

