Class SgdUpdater

    • Constructor Detail

      • SgdUpdater

        public SgdUpdater​(Sgd 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<Sgd>
        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)
        Description copied from interface: GradientUpdater
        Modify the gradient to be an update. Note that this is be done in-place
        Specified by:
        applyUpdater in interface GradientUpdater<Sgd>
        Parameters:
        gradient - the gradient to modify