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!