add learning rate calculation