ExTorch.Export.Model
(extorch v0.4.0)
Copy Markdown
A loaded ExportedProgram model ready for inference.
Contains the computation graph, weight tensors, and input/output mappings.
The compiled_graph field holds per-node closures built at load/1 time
that capture pre-resolved scalar args and tensor input refs, so forward/2
is a tight loop over closures instead of re-parsing the graph each call.
initial_values holds the pre-built parameter value map so forward
doesn't re-resolve p*/b* names on every inference.
Summary
Types
@type t() :: %ExTorch.Export.Model{ compiled_graph: [{[String.t()], (map() -> any())}], device: atom() | {atom(), non_neg_integer()}, initial_values: map(), native_compiled: ExTorch.Export.CompiledGraph.t() | nil, param_inputs: [String.t()], schema: map(), user_inputs: [String.t()], weights: %{required(String.t()) => ExTorch.Tensor.t()} }