Class BatchNorm.BaseBuilder<T extends BatchNorm.BaseBuilder<T>>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int axis  
      protected boolean center  
      protected float epsilon  
      protected float momentum  
      protected boolean scale  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected BaseBuilder()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract BatchNorm build()
      Builds the new BatchNorm.
      T optAxis​(int axis)
      Set the axis in which channel is specified.
      T optCenter​(boolean val)
      If True, add offset of `beta` to normalized tensor.
      T optEpsilon​(float val)
      Sets the epsilon value to prevent division by 0.
      T optMomentum​(float val)
      Set the momentum for moving average.
      T optScale​(boolean val)
      If True, multiply result by `gamma`.
      abstract T self()
      Returns this {code Builder} object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • axis

        protected int axis
      • epsilon

        protected float epsilon
      • momentum

        protected float momentum
      • center

        protected boolean center
      • scale

        protected boolean scale
    • Constructor Detail

      • BaseBuilder

        protected BaseBuilder()
    • Method Detail

      • optAxis

        public T 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 T 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 T 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 T optEpsilon​(float val)
        Sets the epsilon value to prevent division by 0.
        Parameters:
        val - the epsilon value
        Returns:
        this Builder
      • optMomentum

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

        public abstract T self()
        Returns this {code Builder} object.
        Returns:
        this BaseBuilder