ExTorch.NN.Layer (extorch v0.4.0)

Copy Markdown

Represents an instantiated neural network layer (nn.Module).

A %ExTorch.NN.Layer{} wraps a reference to a torch::nn::AnyModule, which can hold any PyTorch layer type (Linear, Conv2d, ReLU, etc.).

Use ExTorch.NN functions to create layers and run forward passes.

Summary

Types

t()

@type t() :: %ExTorch.NN.Layer{
  reference: reference(),
  resource: any(),
  type_name: String.t()
}