Class ModuleLayer
java.lang.Object
smile.deep.layer.ModuleLayer
- Direct Known Subclasses:
AdaptiveAvgPool2dLayer, AvgPool2dLayer, BatchNorm1dLayer, BatchNorm2dLayer, Conv2dLayer, DropoutLayer, EmbeddingLayer, GroupNormLayer, LinearLayer, MaxPool2dLayer
Base class for layers backed by a native
smile_torch module
(Linear, Conv2d, pooling, normalization, …).
Each instance owns two native handles: the typed layer handle (e.g.
ST_Linear) used for forward, and an ST_Module view of
the same module used for registration into blocks and for device/dtype moves.
Both are released together once the wrapper becomes unreachable.