Interface GradientsAccumulator

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void applyUpdate​(StepFunction function, INDArray params, INDArray updates, boolean isFinalStep)
      This method applies accumulated updates via given StepFunction
      void applyUpdate​(StepFunction function, INDArray params, INDArray updates, double alpha)
      This method applies accumulated updates via given StepFunction
      IndexedTail getExternalSource()  
      boolean hasAnything()
      This method checks if there are any (probably external) updates available
      void markExternalUpdates​(boolean updatesAvailable)
      This method allows to highlight early availability of updates
      void receiveUpdate​(INDArray array)
      This method accepts updates suitable for StepFunction and puts them to the queue, which is used in backpropagation loop PLEASE NOTE: array is expected to be ready for use and match params dimensionality
      void reset()
      This method resets all accumulated updates (if any)
      void setExternalSource​(IndexedTail source)
      This method allows to pass external updates to accumulator, they will be populated across all workers using this GradientsAccumulator instance
      void storeUpdate​(INDArray array, int iterationNumber, int epochNumber)
      This method accepts updates suitable for StepFunction, and accumulates/propagates it across all workers
      void touch()
      This method does initialization of given worker wrt Thread-Device Affinity
    • Method Detail

      • setExternalSource

        void setExternalSource​(IndexedTail source)
        This method allows to pass external updates to accumulator, they will be populated across all workers using this GradientsAccumulator instance
        Parameters:
        source -
      • applyUpdate

        void applyUpdate​(StepFunction function,
                         INDArray params,
                         INDArray updates,
                         boolean isFinalStep)
        This method applies accumulated updates via given StepFunction
        Parameters:
        function -
        params -
      • applyUpdate

        void applyUpdate​(StepFunction function,
                         INDArray params,
                         INDArray updates,
                         double alpha)
        This method applies accumulated updates via given StepFunction
        Parameters:
        function -
        params -
      • storeUpdate

        void storeUpdate​(INDArray array,
                         int iterationNumber,
                         int epochNumber)
        This method accepts updates suitable for StepFunction, and accumulates/propagates it across all workers
        Parameters:
        array -
      • receiveUpdate

        void receiveUpdate​(INDArray array)
        This method accepts updates suitable for StepFunction and puts them to the queue, which is used in backpropagation loop PLEASE NOTE: array is expected to be ready for use and match params dimensionality
        Parameters:
        array -
      • markExternalUpdates

        void markExternalUpdates​(boolean updatesAvailable)
        This method allows to highlight early availability of updates
        Parameters:
        updatesAvailable -
      • reset

        void reset()
        This method resets all accumulated updates (if any)
      • touch

        void touch()
        This method does initialization of given worker wrt Thread-Device Affinity
      • hasAnything

        boolean hasAnything()
        This method checks if there are any (probably external) updates available
        Returns: