Class Sequential

java.lang.Object
ai.beestream.jitnn.nn.Module
ai.beestream.jitnn.nn.Sequential
All Implemented Interfaces:
AutoCloseable

public final class Sequential extends Module
Applies its modules in order.
  • Constructor Details

    • Sequential

      public Sequential(Module... layers)
      The modules applied in order, each to the previous one's output.
  • Method Details

    • forward

      public Tensor forward(Tensor x)
      Applies the layers, fusing a ReLU into the layer before it: Linear + ReLU and Conv2d + ReLU run as one GEMM with the activation in the epilogue, BatchNorm2d + ReLU as one kernel.
      Specified by:
      forward in class Module