Class BatchNorm.Builder

  • Enclosing class:
    BatchNorm

    public static final class BatchNorm.Builder
    extends java.lang.Object
    The Builder to construct a BatchNorm.
    • Method Detail

      • optAxis

        public BatchNorm.Builder optAxis​(int axis)
        Set the axis in which channel is specified. Defaults to 1.
        Parameters:
        axis - the axis in which channel is specified
        Returns:
        this Builder
      • optCenter

        public BatchNorm.Builder optCenter​(boolean val)
        If True, add offset of `beta` to normalized tensor. Defaults to True.
        Parameters:
        val - True or False on whether to add and train offset value
        Returns:
        this Builder
      • optScale

        public BatchNorm.Builder optScale​(boolean val)
        If True, multiply result by `gamma`. Defaults to True;
        Parameters:
        val - True or False on whether to add and train scale value
        Returns:
        this Builder
      • optEpsilon

        public BatchNorm.Builder optEpsilon​(float val)
        Sets the epsilon value to prevent division by 0.
        Parameters:
        val - the epsilon value
        Returns:
        this Builder
      • optMomentum

        public BatchNorm.Builder optMomentum​(float val)
        Set the momentum for moving average.
        Parameters:
        val - the momentum for moving average
        Returns:
        this Builder