def decay_rates(trainer, sess):
    """ Decays the learning rate exponentially
        :param trainer: A supervised trainer instance.
        :param sess: The TensorFlow session.
        :return: Nothing
        :type trainer: diplomacy_research.models.training.supervised.trainer.SupervisedTrainer
    """
    nb_completed_epochs, current_progress = trainer.progress
    total_progress = nb_completed_epochs + current_progress
    if hasattr(trainer.model, 'decay_learning_rate'):
        new_learning_rate = (trainer.flags.learning_rate * trainer.flags.
            lr_decay_factor ** total_progress)
        trainer.run_without_hooks(sess, trainer.model.decay_learning_rate,
            feed_dict={trainer.model.placeholders['learning_rate']:
            new_learning_rate})
        trainer.learning_rate = new_learning_rate
