Keras callbacks - training or validation accuracy

I believe Keras automatically tracks validation metrics by just pretending “val” to the metric name. So you would first have to specify “val_accuracy” or “val_acc” in the TuneReportCallback that gets passed into model.fit: TuneReportCallback(“val_accuracy”).

This will cause the validation accuracy to get reported to Tune. And then when you call tune.run, specify this as the metric argument: tune.run(..., metric=“val_accuracy”).

1 Like