Class UNet

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

public final class UNet extends Module
A small U-Net (Ronneberger et al., 2015) for 28x28 inputs with two down-sampling levels: double 3x3 convolutions with ReLU, max pooling, a bottleneck, then one level up through a stride-2 transposed convolution and one through bilinear upsampling and a 1x1 convolution, each concatenated with the encoder's features of that size; a 1x1 convolution gives one logit per pixel. Convolutions are seeded in construction order (encoder, bottleneck, decoder, head).
  • Constructor Details

    • UNet

      public UNet(int in, int width, long seed)
      A U-Net over images of in channels, width channels at the first level (doubling at each level down), initialised from seed.
  • Method Details

    • forward

      public Tensor forward(Tensor x)
      Logits [B, 1, H, W] for x [B, in, H, W] (H and W divisible by 4).
      Specified by:
      forward in class Module