d192ef06119f3eccf569a844b30976db99cfa0f6,python/ray/util/sgd/torch/training_operator.py,TrainingOperator,validate,#TrainingOperator#Any#Any#,206
Before Change
losses.update(
metrics["loss"], n=metrics.get("num_samples", 1))
if "num_correct" in metrics:
total_correct += metrics["num_correct"]
stats = {
"batch_count": batch_idx + 1,
"mean_validation_loss": losses.avg,
"mean_accuracy": total_correct / losses.count
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.
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: 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
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