d192ef06119f3eccf569a844b30976db99cfa0f6,python/ray/util/sgd/torch/training_operator.py,TrainingOperator,validate,#TrainingOperator#Any#Any#,206

Before Change


                metrics = self.validate_batch(batch, batch_info)
                if "loss" in metrics:
                    losses.update(
                        metrics["loss"], n=metrics.get("num_samples", 1))

                if "num_correct" in metrics:
                    total_correct += metrics["num_correct"]

After Change


                metrics = self.validate_batch(batch, batch_info)
                metric_meters.update(metrics, n=metrics.pop(NUM_SAMPLES, 1))

        return metric_meters.summary()

    def validate_batch(self, batch, batch_info):
        Calcuates the loss and accuracy over a given batch.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: ray-project/ray
Commit Name: d192ef06119f3eccf569a844b30976db99cfa0f6
Time: 2020-03-10
Author: rliaw@berkeley.edu
File Name: python/ray/util/sgd/torch/training_operator.py
Class Name: TrainingOperator
Method Name: validate


Project Name: ray-project/ray
Commit Name: d192ef06119f3eccf569a844b30976db99cfa0f6
Time: 2020-03-10
Author: rliaw@berkeley.edu
File Name: python/ray/util/sgd/torch/training_operator.py
Class Name: TrainingOperator
Method Name: train_epoch


Project Name: PavlosMelissinos/enet-keras
Commit Name: d5f386ee8b68b01e77278f2b318de3aebbc55373
Time: 2017-10-04
Author: pmelissi@iti.gr
File Name: src/experiments/core.py
Class Name: Experiment
Method Name: model