import tensorflow as tf

    if encoder.position_bias and input_length is not None and time is not None:
        src_pos = tf.tile(tf.expand_dims(tf.range(time_steps), axis=0), [batch_size, 1])
        trg_pos = tf.tile(tf.reshape(time, [1, 1]), [batch_size, time_steps])
        src_len = tf.tile(tf.expand_dims(input_length, axis=1), [1, time_steps]) # - 1
