Class AlexNet.Builder

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

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

    • setDropOutRate

      public AlexNet.Builder setDropOutRate(float dropOutRate)
      Sets the dropout rate in the network.
      Parameters:
      dropOutRate - the dropout rate
      Returns:
      this Builder
    • setNumChannels

      public AlexNet.Builder setNumChannels(int[] numChannels)
      Sets the number of channels for the AlexNet blocks.
      Parameters:
      numChannels - the number of channels for every AlexNet block.
      Returns:
      this Builder
    • setOutSize

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

      public ai.djl.nn.Block build()
      Builds a AlexNet block.
      Returns:
      the AlexNet block