import tensorflow as tf

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

  def testDynamicAttentionDecoder2(self):
    with self.test_session() as sess:
      with tf.variable_scope("root", initializer=tf.constant_initializer(0.5)):
        cell = tf.nn.rnn_cell.GRUCell(2)
        inp = tf.constant(0.5, shape=[2, 2, 2])
        enc_outputs, enc_state = tf.nn.dynamic_rnn(cell, inp, dtype=tf.float32)
        attn_states = enc_outputs
        dec_inp = [tf.constant(0.4, shape=[2, 2])] * 3
