Class VisionLayerNorm

java.lang.Object
smile.llm.model.qwen.VisionLayerNorm
All Implemented Interfaces:
Function<Tensor,Tensor>, Layer

public class VisionLayerNorm extends Object implements Layer
Standard LayerNorm with learnable weight and bias (ViT / merger).
  • Constructor Details

    • VisionLayerNorm

      public VisionLayerNorm(int dim, double eps)
      Constructor.
      Parameters:
      dim - feature dimension.
      eps - numerical stability epsilon.
  • Method Details

    • forward

      public Tensor forward(Tensor input)
      Description copied from interface: Layer
      Forward propagation (or forward pass) through the layer.
      Specified by:
      forward in interface Layer
      Parameters:
      input - the input tensor.
      Returns:
      the output tensor.
    • module

      public MemorySegment module()
      Description copied from interface: Layer
      Returns the native ST_Module handle for this layer.
      Specified by:
      module in interface Layer
      Returns:
      the native ST_Module handle.