Unverified Commit 57820456 authored by Matt's avatar Matt Committed by GitHub
Browse files

Fix crash when logs are empty because Keras has wiped them out of spite (#15258)

parent 1fc0fa46
......@@ -706,6 +706,9 @@ def parse_keras_history(logs):
"""
if hasattr(logs, "history"):
# This looks like a `History` object
if not hasattr(logs, "epoch"):
# This history looks empty, return empty results
return None, [], dict()
logs.history["epoch"] = logs.epoch
logs = logs.history
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment