AdaGrad#

class vulkpy.nn.AdaGrad#

Bases: Optimizer

AdaGrad Optimizer

Notes

This class implement AdaGrad [adagrad1].

References

Methods Summary

init_state(shape)

Initialize Optimizer state

Methods Documentation

init_state(shape: Iterable[int]) AdaGradState#

Initialize Optimizer state

Parameters:

shape (iterable of ints) – Shape of parameter

Returns:

Optimizer state

Return type:

AdaGradState

__init__(gpu: GPU, *, lr: float = 0.01, tau: float = 0.0, eps: float = 1e-08)#

Initialize AdaGrad

Parameters:
  • gpu (vulkpy.GPU) – GPU

  • lr (float, optional) – AdaGrad parameter (learning rate). The default is 0.01.

  • tau (float, optional) – AdaGrad parameter (initialial accumulator). The default is 0.

  • eps (float, optional) – AdaGrad parameter (small positive). The default is 1e-8