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

Before Change


            "mean_validation_loss": losses.avg,
            "mean_accuracy": total_correct / losses.count
        }
        return stats

    def validate_batch(self, batch, batch_info):
        Calcuates the loss and accuracy over a given batch.

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: 3

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: bambinos/bambi
Commit Name: 258fc048d0d0825e5a2b94b5e68bda386513ee54
Time: 2019-09-03
Author: camenpihor@gmail.com
File Name: bambi/results.py
Class Name: MCMCResults
Method Name: summary


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