code: public INDArray getGradient(INDArray gradient, int iteration) {
          if (historicalGradient == null)
              throw new IllegalStateException("Updater has not been initialized with view state");
  
          historicalGradient.addi(gradient.mul(gradient));
  
          INDArray sqrtHistory = sqrt(historicalGradient.dup(gradientReshapeOrder), false).addi(epsilon);
          // lr * gradient / (sqrt(sumSquaredGradients) + epsilon)
          INDArray ret = gradient.muli(sqrtHistory.rdivi(learningRate));
          numIterations++;
          return ret;
      }
docs: 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
  
  @param gradient  the gradient to get learning rates for
  @param iteration
  @return the feature specific learning rates