ShapeInfer #
Shape inference / checking viewer for NN.IR.Graph.
TorchLean’s IR carries a declared outShape at each node. In practice, there are two common
debugging questions when working with graphs:
- "Do the declared shapes match what the op semantics would infer from parent shapes?"
- "Where exactly did shape propagation fail, and what parent shapes caused it?"
This module provides a small infoview panel that answers those questions in a compact table.
Main command:
#shape_infer_view g
Main definitions #
inferRows: perform sequential shape inference and collect row diagnostics.shapeInferHtml: render declared vs inferred shapes in a status table.#shape_infer_view: command entry point.
Render a per-node table comparing declared shapes vs inferred shapes for an IR graph.