nn_compose¶
- probly.traverse_nn.nn_compose(*traversers: Traverser, nn_traverser: Traverser = <pytraverse.composition.FlexdispatchTraverser object>, name: str | None = None) Traverser[source]¶
Compose a custom traverser with neural network traversal functionality.
This function creates a sequential traverser that combines neural network traversal, a custom traverser, and layer counting capabilities in a specific order.
- Parameters:
traversers – Custom traverser functions to be composed (sequentially) with the NN traverser.
nn_traverser – The neural network traverser to use. Defaults to the module’s nn_traverser.
name – Optional name for the composed traverser.
- Returns:
A composed sequential traverser that applies NN traversal, custom traversal, and layer counting in sequence.