SGDGPU class

Applies the SGD optimizer to every element of its parameter tensors. SGD is a very simply descent method and my get stuck in local minima. This function does not require to be reallocated on each training step and can be reused indefinitely.

Inheritance

Constructors

SGDGPU(List<GPUTensor> parameters, double learningRate)
Initializes the SGD optimizer, which does not allocate any additional VRAM. Requires the list of trainable parameters and the learningRate.

Properties

hashCode → int
The hash code for this object.
no setterinherited
learningRate ↔ double
getter/setter pairinherited
parameters ↔ List<GPUTensor>
List of parameters the gradient is responsible for updating.
getter/setter pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refreshStep(CommandBuffer tape) → void
Called once before every replay of an already-compiled tape. Optimizers with no per-step state (SGD) can leave this as a no-op; Adam overrides it to patch its step count.
inherited
step(CommandBuffer tape) → void
Appends the SGD weight update operations to the provided tape. This optimizer does not require to be updated and can be reused indefinitely via the same tape execution.
override
toString() → String
A string representation of this object.
inherited
zeroGrad(CommandBuffer tape) → void
Appends the zero-gradient operations to the tape to clear the gradients for the next pass.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited