66aa72feaf6cccdc6ee132b24465b0f113bb0d31,theanolm/src/theanolm/trainers/modeltrainer.py,ModelTrainer,validations_since_min_cost,#ModelTrainer#,252

Before Change


        

        if len(self._cost_history) == 0:
            raise RuntimeError("ModelTrainer.validations_since_min_cost() called with empty cost history.")
        else:
            // Reverse the order of self._cost_history to find the last element
            // with the minimum value (in case there are several elements with the
            // same value.

After Change


        

        averaged_cost_history = \
            [numpy.mean(numpy.asarray(self._cost_history[i - 3:i]))
             for i in range(3, len(self._cost_history) + 1)]
        logging.debug("Cost history averaged over 3 consecutive validations:")
        logging.debug(str(numpy.asarray(averaged_cost_history)))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 3

Instances


Project Name: senarvi/theanolm
Commit Name: 66aa72feaf6cccdc6ee132b24465b0f113bb0d31
Time: 2015-10-09
Author: seppo.git@marjaniemi.com
File Name: theanolm/src/theanolm/trainers/modeltrainer.py
Class Name: ModelTrainer
Method Name: validations_since_min_cost


Project Name: asyml/texar
Commit Name: 99153ad034108b7d0e759fc246cb3d05593ee897
Time: 2018-06-02
Author: zhitinghu@gmail.com
File Name: texar/losses/rewards.py
Class Name:
Method Name: discount_reward


Project Name: pfnet/optuna
Commit Name: 02895e43b1b004c6485ec23ab714c5af33bc686d
Time: 2020-05-18
Author: k_nzw@klis.tsukuba.ac.jp
File Name: optuna/samplers/cmaes.py
Class Name:
Method Name: _initialize_x0


Project Name: iskandr/fancyimpute
Commit Name: c01dacf7ea92ad8cc9d919a778ba03f24ebe47ac
Time: 2016-01-05
Author: alex.rubinsteyn@gmail.com
File Name: fancyimpute/solver.py
Class Name: Solver
Method Name: complete


Project Name: drckf/paysage
Commit Name: b7165339b75ab0c66628a00c611e7327a85844ec
Time: 2017-02-26
Author: charleskennethfisher@gmail.com
File Name: paysage/backends/pytorch_backend/matrix.py
Class Name:
Method Name: mean