vkML 0.1.0

SGD

Stochastic gradient descent, with optional momentum and Nesterov look-ahead.

class SGD : Optimizerpython/vkml/optim.py:146

The update as implemented, in order:

State: one velocity tensor per parameter, and only when momentum is non-zero — so plain SGD costs no extra memory.

Construction

__init__

def __init__self, params, lr: float=0.01, momentum: float=0.0, weight_decay: float=0.0, nesterov: bool=Falsepython/vkml/optim.py:155

Update

See also Optimizer, Adam, backward

vkML — Vulkan-first machine learning in C++20. Apache-2.0. Signatures on this page are generated from the installed module.