TorchLean API

NN.Examples.Interop.PyTorch.Roundtrip

PyTorch Round-Trip Driver #

This module is the single source of truth for the state-dict round-trip demos.

It intentionally does not re-implement model math. Instead it wires together the existing:

Run via the TorchLean example runner:

lake exe torchlean pytorch_roundtrip --model mlp|cnn|transformer --action export|import

Design goals:

CLI model/action selection #

Paths and fixed demo dimensions #

Small IO helpers #

Export actions #

Import actions (Lean forward pass) #

Public entrypoint called from the examples zoo runner #