TensorPlay

Latest development documentation · Updated 2026-09-08. A documentation snapshot for package 1.0.0.dev20260909 is not available.

On this page

tensorplay.nn.modules.module.register_module_full_backward_pre_hook

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

Register a backward pre-hook common to all the modules.

Warning

This adds global state to the nn.module module and it is only intended for debugging/profiling purposes.

Hooks registered using this function behave in the same way as those registered by tensorplay.nn.Module.register_full_backward_pre_hook(). Refer to its documentation for more details.

Hooks registered using this function will be called before hooks registered using tensorplay.nn.Module.register_full_backward_pre_hook().

Returns:

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

Return type:

tensorplay.utils.hooks.RemovableHandle

Search documentation

Search all 1,743 documentation pages.

Keyboard shortcuts

Global

  • /Focus search
  • ?This dialog
  • ,Open settings
  • jAI assistant

Search

  • Navigate results
  • Open result
  • escClose

Package

  • mMain information
  • dDocs
  • .Code
  • -Changelog
  • tTimeline
  • sStats
  • vVersions