6aad1de658a933d3fa376f7fe9abf419da8a8bd2,python/baseline/pytorch/lm/train.py,LanguageModelTrainerPyTorch,test,#LanguageModelTrainerPyTorch#Any#Any#Any#,38

Before Change


        metrics["avg_loss"] = avg_loss
        metrics["perplexity"] = np.exp(avg_loss)

        duration = time.time() - start_time
        print("%s time (%.3f sec)" % (phase, duration))
        self.log.debug({"phase": phase, "time": duration})

        for reporting in reporting_fns:

After Change


            if hidden is not None:
                hidden = self.repackage_hidden(hidden)
        metrics = self.calc_metrics(total_loss, total_toks)
        self.report(
            epoch, metrics, start,
            phase, "EPOCH", reporting_fns
        )
        return metrics

    def train(self, ts, reporting_fns):
        start = time.time()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: dpressel/mead-baseline
Commit Name: 6aad1de658a933d3fa376f7fe9abf419da8a8bd2
Time: 2018-11-26
Author: blester125@users.noreply.github.com
File Name: python/baseline/pytorch/lm/train.py
Class Name: LanguageModelTrainerPyTorch
Method Name: test


Project Name: brilee/MuGo
Commit Name: 5b1feb37e68471a811a90e008eff787da294c477
Time: 2016-09-07
Author: brian.kihoon.lee@gmail.com
File Name: policy.py
Class Name: PolicyNetwork
Method Name: train


Project Name: brilee/MuGo
Commit Name: 5b1feb37e68471a811a90e008eff787da294c477
Time: 2016-09-07
Author: brian.kihoon.lee@gmail.com
File Name: policy.py
Class Name: PolicyNetwork
Method Name: check_accuracy