Class AdaGradUpdater

    • Field Detail

      • historicalGradient

        public INDArray historicalGradient
      • shape

        public int[] shape
      • learningRate

        protected double learningRate
      • numIterations

        protected int numIterations
    • Constructor Detail

      • AdaGradUpdater

        public AdaGradUpdater​(AdaGrad config)
    • Method Detail

      • setStateViewArray

        public void setStateViewArray​(INDArray viewArray,
                                      long[] gradientShape,
                                      char gradientOrder,
                                      boolean initialize)
        Description copied from interface: GradientUpdater
        For the internal updater state (if any): set this to use the provided array. Used during initialization, and when restoring the updater state (after serialization, for example)
        Specified by:
        setStateViewArray in interface GradientUpdater<AdaGrad>
        Parameters:
        viewArray - Array (that is a view of a larger array) to use for the state.
        initialize - If true: the updater must initialize the view array. If false: no change to view array contents
      • applyUpdater

        public void applyUpdater​(INDArray gradient,
                                 int iteration,
                                 int epoch)
        Gets feature specific learning rates Adagrad keeps a history of gradients being passed in. Note that each gradient passed in becomes adapted over time, hence the opName adagrad
        Specified by:
        applyUpdater in interface GradientUpdater<AdaGrad>
        Parameters:
        gradient - the gradient to get learning rates for
        iteration -