Skip to content
Snippets Groups Projects
Commit 172c7b02 authored by Dennis Noll's avatar Dennis Noll
Browse files

[keras] adds write_summary

writes keras model summary to law target
parent ce9564d8
No related branches found
No related tags found
No related merge requests found
......@@ -1330,3 +1330,11 @@ class GroupedXEnt(tf.keras.losses.Loss):
class_weight=self.class_weight,
epsilon=self.epsilon,
)
def write_summary(model, target):
"""write tf keras model summary to law target"""
summary = []
model.summary(print_fn=lambda x: summary.append(x))
summary = "\n".join(summary)
target.dump(summary)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment