Python class
PrintHook
PrintHook
class max.nn.hooks.PrintHook(export_path=None, filter=None)
Bases: BasePrintHook
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.
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
name_layers_v3()
name_layers_v3(model)
Create names for all v3 Module layers based on nested attributes.
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!