def on_train_end(self, **kwargs):
    'Load the best model.'
    if self.save_model:
        if self.model_path.is_file():
            with self.model_path.open('rb') as model_file:
                self.learn.load(model_file, purge=False)
                print('Loaded best saved model from {}'.format(self.model_path))
Load the best model.
def on_train_end(self, **kwargs):
    
    if self.save_model:
        if self.model_path.is_file():
            with self.model_path.open('rb') as model_file:
                self.learn.load(model_file, purge=False)
                print('Loaded best saved model from {}'.format(self.model_path))