e9d3004f9515708edafd5fc5f96a81e564d40d2a,theanolm/src/theanolm/trainers/validationaveragetrainer.py,ValidationAverageTrainer,_validate,#ValidationAverageTrainer#Any#,18

Before Change


            self.trainer_state_min_cost = self.trainer_state_previous
            self.save_model()
        else:
            self.network_state_previous = self.network.get_state()
            self.trainer_state_previous = self.get_state()
            if (self.options["wait_improvement"] >= 0) and \
               (validations_since_best > self.options["wait_improvement"]):
                logging.debug("%d validations since the minimum perplexity was "

After Change


        if validations_since_best == 0:
            // At least three validations have been performed and this is the
            // minimum cost so far.
            assert not self.previous_state is None

            // The minimum cost is from the three previous validations.
            // Previous validation is in the middle of those validations.
            self._set_min_cost_state(self.previous_state)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: senarvi/theanolm
Commit Name: e9d3004f9515708edafd5fc5f96a81e564d40d2a
Time: 2015-10-14
Author: seppo.git@marjaniemi.com
File Name: theanolm/src/theanolm/trainers/validationaveragetrainer.py
Class Name: ValidationAverageTrainer
Method Name: _validate


Project Name: flow-project/flow
Commit Name: 21144b719d34315ee35560525f4f9a845f5f9ce2
Time: 2018-11-27
Author: akreidieh@gmail.com
File Name: tests/fast_tests/test_environment_base_class.py
Class Name: TestAbstractMethods
Method Name: test_get_state


Project Name: senarvi/theanolm
Commit Name: e9d3004f9515708edafd5fc5f96a81e564d40d2a
Time: 2015-10-14
Author: seppo.git@marjaniemi.com
File Name: theanolm/src/theanolm/trainers/basictrainer.py
Class Name: BasicTrainer
Method Name: _validate