Class BaseDFunction<T extends deepboof.Tensor<T>>

java.lang.Object
deepboof.impl.forward.standard.BaseFunction<T>
deepboof.impl.backward.standard.BaseDFunction<T>
All Implemented Interfaces:
deepboof.DFunction<T>, deepboof.Function<T>
Direct Known Subclasses:
BaseDBatchNorm_F64, DFunctionDropOut_F64, DFunctionLinear_F64, ElementWiseDFunction

public abstract class BaseDFunction<T extends deepboof.Tensor<T>>
extends deepboof.impl.forward.standard.BaseFunction<T>
implements deepboof.DFunction<T>
Base class which implements common functionality between all DFunction
  • Field Summary

    Fields
    Modifier and Type Field Description
    protected boolean learningMode  

    Fields inherited from class deepboof.impl.forward.standard.BaseFunction

    miniBatchSize, parameters, shapeInput, shapeOutput, shapeParameters
  • Constructor Summary

    Constructors
    Constructor Description
    BaseDFunction()  
  • Method Summary

    Modifier and Type Method Description
    protected abstract void _backwards​(T input, T dout, T gradientInput, List<T> gradientParameters)  
    void backwards​(T input, T dout, T gradientInput, List<T> gradientParameters)  
    void evaluating()  
    boolean isLearning()  
    void learning()  

    Methods inherited from class deepboof.impl.forward.standard.BaseFunction

    _forward, _initialize, _setParameters, forward, getOutputShape, getParameters, getParameterShapes, initialize, setParameters

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface deepboof.Function

    forward, getOutputShape, getParameters, getParameterShapes, getTensorType, initialize, setParameters
  • Field Details

    • learningMode

      protected boolean learningMode
  • Constructor Details

    • BaseDFunction

      public BaseDFunction()
  • Method Details

    • learning

      public void learning()
      Specified by:
      learning in interface deepboof.DFunction<T extends deepboof.Tensor<T>>
    • evaluating

      public void evaluating()
      Specified by:
      evaluating in interface deepboof.DFunction<T extends deepboof.Tensor<T>>
    • backwards

      public void backwards​(T input, T dout, T gradientInput, List<T> gradientParameters)
      Specified by:
      backwards in interface deepboof.DFunction<T extends deepboof.Tensor<T>>
    • _backwards

      protected abstract void _backwards​(T input, T dout, T gradientInput, List<T> gradientParameters)
    • isLearning

      public boolean isLearning()
      Specified by:
      isLearning in interface deepboof.DFunction<T extends deepboof.Tensor<T>>