API symbolsnn
Copy
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
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?
