Class ResNet

java.lang.Object
ai.beestream.jitnn.nn.models.ResNet

public final class ResNet extends Object
ResNet (He et al., 2016). resnet18(int, int, boolean, long) and resnet50(int, int, boolean, long) are torchvision's layouts; the small variant replaces the 7x7/2 stem and max pool with a 3x3/1 stem for 28-32 pixel inputs (the usual CIFAR adaptation). Convolutions have no bias, every one is followed by BatchNorm.
  • Method Details

    • resnet18

      public static Sequential resnet18(int inChannels, int classes, boolean small, long seed)
      ResNet-18: BasicBlocks [2, 2, 2, 2], widths 64-512.
    • resnet50

      public static Sequential resnet50(int inChannels, int classes, boolean small, long seed)
      ResNet-50: Bottleneck blocks [3, 4, 6, 3], widths 64-512, expansion 4 (torchvision's v1.5, stride on the 3x3).