TensorPlay
API symbolsnn
Copy
View MarkdownDownload .md

tensorplay.nn.modules.module.register_module_backward_hook

tensorplay.nn.modules.module.register_module_backward_hook(hook: Callable[[Module, tuple[TensorBase, ...] | TensorBase, tuple[TensorBase, ...] | TensorBase], None | tuple[TensorBase, ...] | TensorBase]) RemovableHandle[source]

Register a backward hook common to all the modules.

This function is deprecated in favor of tensorplay.nn.modules.module.register_module_full_backward_hook() and the behavior of this function will change in future versions.

Returns:

a handle that can be used to remove the added hook by calling handle.remove()

Return type:

tensorplay.utils.hooks.RemovableHandle

Ask DeepWiki