SGDState#

class vulkpy.nn.SGDState#

Bases: OptimizerState

Optimizer State for SGD

Methods Summary

grad2diff(grad)

Compute diff from gradient

Methods Documentation

grad2diff(grad: Array) Array#

Compute diff from gradient

Parameters:

grad (vulkpy.Array) – Gradient

Returns:

diff – Update diff

Return type:

vulkpy.Array

__init__(opt: SGD)#

Initialize SGD state

Parameters:

opt (vulkpy.SGD) – SGD Optimizer