AdaGradState#

class vulkpy.nn.AdaGradState#

Bases: OptimizerState

Optimizer State for AdaGrad

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: AdaGrad, shape: Iterable[int], tau: float)#

Initialize AdaGrad

Parameters:
  • opt (vulkpy.AdaGrad) – AdaGrad Optimizer

  • shape (iterable of ints) – Value shape

  • tau (float) – Initial summation