"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.