GpuOptimizerState

Models & Types · AiDotNet.Interfaces

Holds the optimizer state buffers for GPU-resident training.

How It Works

Different optimizers require different state:

  • SGD with momentum: velocity buffer
  • Adam/AdamW: first moment (m) and second moment (v) buffers
  • RMSprop: squared average buffer
  • Adagrad: accumulated gradient buffer

Constructors

Constructor Summary
GpuOptimizerState()

Properties

Property Summary
IGpuBuffer AccumulatedGrad { get; set; } Accumulated gradient buffer (for Adagrad).
IGpuBuffer M { get; set; } First moment buffer (for Adam-family optimizers).
IGpuBuffer SquaredAvg { get; set; } Squared average buffer (for RMSprop).
IGpuBuffer V { get; set; } Second moment buffer (for Adam-family optimizers).
IGpuBuffer Velocity { get; set; } Velocity buffer (for SGD momentum, NAG, LARS).