if dtype is not None and dtype != tf.float32:
      forward_position_sequence = tf.cast(