Class ResNetV1.Builder

java.lang.Object
ai.djl.basicmodelzoo.cv.classification.ResNetV1.Builder
Enclosing class:
ResNetV1

public static final class ResNetV1.Builder extends Object
The Builder to construct a ResNetV1 object.
  • Method Details

    • setNumLayers

      public ResNetV1.Builder setNumLayers(int numLayers)
      Sets the number of layers in the network.
      Parameters:
      numLayers - the number of layers
      Returns:
      this Builder
    • setOutSize

      public ResNetV1.Builder setOutSize(long outSize)
      Sets the size of the output.
      Parameters:
      outSize - the output size
      Returns:
      this Builder
    • optBatchNormMomentum

      public ResNetV1.Builder optBatchNormMomentum(float batchNormMomentum)
      Sets the momentum of batchNorm layer.
      Parameters:
      batchNormMomentum - the momentum
      Returns:
      this Builder
    • setImageShape

      public ResNetV1.Builder setImageShape(ai.djl.ndarray.types.Shape imageShape)
      Sets the shape of the image.
      Parameters:
      imageShape - the shape of the image
      Returns:
      this Builder
    • build

      public ai.djl.nn.SequentialBlock build()
      Builds a ResNetV1 block.
      Returns:
      the ResNetV1 block