import tensorflow as tf

        trg_len = tf.shape(attention_weights)[1]

        src_indices = tf.tile(tf.reshape(tf.range(src_len), shape=[1, 1, src_len]), [batch_size, trg_len, 1])
        trg_indices = tf.tile(tf.reshape(tf.range(trg_len), shape=[1, trg_len, 1]), [batch_size, 1, src_len])

        source_length = encoder_input_length[0]
