Change the validation frequency in sgd