ExTorch.NN.JITBackedModel (extorch v0.3.0)

Copy Markdown

A model instance backed by a loaded TorchScript (.pt) file.

This struct is returned by MyModule.from_jit/1 and holds the underlying JIT model. When used with the DSL's layer/3 function, forward passes are delegated to the JIT model's forward method directly, using the pre-trained weights from the .pt file.

The DSL module definition serves as a structural contract -- the declared layers are validated against the JIT model's submodules at load time.

Summary

Types

t()

@type t() :: %ExTorch.NN.JITBackedModel{
  jit_model: ExTorch.JIT.Model.t(),
  layer_names: [atom()],
  module_name: atom()
}