kumulant

SgdOptimizer

class SgdOptimizer(val featureSize: Int, val learningRate: ScalarExpr, concurrency: Concurrency = Concurrency.None) : Optimizer(source)

Plain SGD: delta = -learningRate(step) * weight * gradient. Stateless apart from the global step counter feeding the schedule.

Constructors

Link copied to clipboard
constructor(featureSize: Int, learningRate: ScalarExpr, concurrency: Concurrency = Concurrency.None)

Properties

Link copied to clipboard
open override val featureSize: Int

Number of weight coordinates this optimizer manages.

Link copied to clipboard

Per-step learning-rate schedule.

Link copied to clipboard
val step: Long

Live view of the per-update step counter; drives the schedule.

Functions

Link copied to clipboard
open override fun advance()

Advance per-update counters (Adam step t, etc.). Called once per stat update.

Link copied to clipboard
open override fun computeDelta(coordIndex: Int, gradient: Double, observationWeight: Double): Double

Per-coordinate update. Reads/writes any auxiliary state owned by the optimizer, then returns the delta the caller should add to w[coordIndex].

Link copied to clipboard
open override fun reset()

Reset all internal state to its initial values.

SgdOptimizer

constructor(featureSize: Int, learningRate: ScalarExpr, concurrency: Concurrency = Concurrency.None)(source)

advance

open override fun advance()(source)

Advance per-update counters (Adam step t, etc.). Called once per stat update.

computeDelta

open override fun computeDelta(coordIndex: Int, gradient: Double, observationWeight: Double): Double(source)

Per-coordinate update. Reads/writes any auxiliary state owned by the optimizer, then returns the delta the caller should add to w[coordIndex].

featureSize

open override val featureSize: Int(source)

Number of weight coordinates this optimizer manages.

learningRate

Per-step learning-rate schedule.

reset

open override fun reset()(source)

Reset all internal state to its initial values.

step

Live view of the per-update step counter; drives the schedule.