DataPredict

API Reference - Others - DistributedGradients

DistributedGradients is a base class for distributed gradient ascent / descent.

Constructors

new()

Create new model object. If any of the arguments are nil, default argument values for that argument will be used.

DistributedGradients.new(gradientChangeMode: string): DistributedGradientObject

Parameters:

Returns:

Functions

setParameters()

Set model’s parameters. When any of the arguments are nil, previous argument values for that argument will be used.

DistributedGradients:setParameters(gradientChangeMode: string)

Parameters:

addGradients()

DistributedGradients:addGradients(Gradients: any)

Parameters:

setModelParameters()

DistributedGradients:setMainModelParameters(ModelParameters: any, doNotDeepCopy: boolean)

Parameters:

getModelParameters()

DistributedGradients:getModelParameters(doNotDeepCopy: boolean): any

Returns:

start()

Creates a new thread for real-time gradient descent / ascent.

ModelParameters:start(): coroutine

Returns:

stop()

Stops the threads for real-time training.

ModelParameters:stop()

clearGradients()

Clears the stored gradients inside the DistributedGradients object.

DistributedGradients:clearGradients()

destroy()

Destroys the model object.

DistributedGradients:destroy()