org.apache.sysml.udf.lib

Class SGDNesterovUpdate

  • All Implemented Interfaces:
    Serializable


    public class SGDNesterovUpdate
    extends PackageFunction
    Use this class to perform an SGD update with Nesterov momentum in CP. Assumption: the input batch fits in CP (which is also the assumption of most deep learning systems). Usage: update_nesterov = externalFunction(matrix[double] X, matrix[double] dX, double lr, double mu, matrix[double] v) return (matrix[double] X, matrix[double] v) implemented in (classname="org.apache.sysml.udf.lib.SGDNesterovUpdate",exectype="mem"); [X, v] = update_nesterov(X, dX, lr, mu, v); This class eliminates the unnecessary instruction overhead as well as memory pressure.
    See Also:
    Serialized Form
    • Constructor Detail

      • SGDNesterovUpdate

        public SGDNesterovUpdate()
    • Method Detail

      • getNumFunctionOutputs

        public int getNumFunctionOutputs()
        Description copied from class: PackageFunction
        Method to get the number of outputs of this package function. This method should be implemented in the user's function.
        Specified by:
        getNumFunctionOutputs in class PackageFunction
        Returns:
        number of outputs
      • getFunctionOutput

        public FunctionParameter getFunctionOutput(int pos)
        Description copied from class: PackageFunction
        Method to get a specific output of this package function. This method should be implemented in the user's function.
        Specified by:
        getFunctionOutput in class PackageFunction
        Parameters:
        pos - function position
        Returns:
        function parameter
      • execute

        public void execute()
        Description copied from class: PackageFunction
        Method that will be executed to perform this function.
        Specified by:
        execute in class PackageFunction

Copyright © 2017 The Apache Software Foundation. All rights reserved.