Python module
hooks
PrintHook
class max.nn.hooks.PrintHook(export_path=None)
Hook that prints/saves layer tensor inputs and outputs.
This class must be initialized added before the graph is built so the print ops can be added to the graph.
-
Parameters:
-
export_path (Optional[str])
export_path
name_layers()
name_layers(model)
Create names for all layers in the model based on nested attributes.
-
Parameters:
-
model (Layer)
-
Return type:
-
None
print_value()
print_value(name, value)
Prints a value, and returns whether the print is successful.
remove()
remove()
-
Return type:
-
None
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!