Closed bdzyubak closed 2 years ago
The default batch size has been set to 32 examples, so decreasing it further runs a risk of being too small and diverging. The learning rate, on the other hand, already uses a scheduler which will progressively decrease. So, going with option 2 for the method to bypass minima.
This module has been implemented in: 9617a644cf2b610a15e2a3c3294e940bc69f7255
The usage is as follows: model = InitializeModel(model_name,dataset,model_path) history = model.run_model() model.try_bypass_local_minimum(n_times=3)
A model optimizer can get stuck in a local minimum yielding sub-optimal accuracy. Some solutions to find a better local minimum are: 1) Retrain from scratch many times. - slow but easy to do; not implementing dedicated functionality for now. 2) Increase the learning rate by a large amount after the model appears to have converged. 3) Decrease batch size which will make training more random and can bypass a local minimum.
This request is to implement methods 2 and/or 3 as a method callable on a trained model. Several iterations should be done and, if any of them yield a better local minimum, the originally trained model should be overwritten.