mirror of
https://github.com/wassname/ray.git
synced 2026-09-11 12:43:20 +08:00
[tune] tf2.0 testing and supporting callables (#5738)
This commit is contained in:
@@ -32,7 +32,11 @@ class TuneReporterCallback(keras.callbacks.Callback):
|
||||
for metric in list(logs):
|
||||
if "loss" in metric and "neg_" not in metric:
|
||||
logs["neg_" + metric] = -logs[metric]
|
||||
self.reporter(keras_info=logs, mean_accuracy=logs["acc"])
|
||||
print(logs)
|
||||
if "acc" in logs:
|
||||
self.reporter(keras_info=logs, mean_accuracy=logs["acc"])
|
||||
else:
|
||||
self.reporter(keras_info=logs, mean_accuracy=logs.get("accuracy"))
|
||||
|
||||
def on_epoch_end(self, batch, logs={}):
|
||||
if not self.freq == "epoch":
|
||||
|
||||
Reference in New Issue
Block a user