moving regularization updater and learning rate computation to an optimizer class