ModuleNode

interface ModuleNode(source)

A generic, dtype-agnostic node interface for traversing module hierarchies. This allows programmatic traversal, parameter collection, and introspection without depending on the input/output dtype generics of Module.

Inheritors

Properties

Link copied to clipboard
abstract val children: List<ModuleNode>

Child nodes in the hierarchy.

Link copied to clipboard
abstract val id: String

A stable identifier for the node. Not required to be globally unique.

Link copied to clipboard
abstract val name: String

Human-readable name of the node, typically the module's name.

Link copied to clipboard
abstract val params: List<ModuleParameter<*, *>>

Parameters owned by this node (weights, biases, etc.).

Link copied to clipboard
abstract var path: String?

Optional path annotation for nicer logs, e.g., "model.encoder.layer1".

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Traversal utilities for ModuleNode hierarchies.