sgd

fun sgd(lr: Double, momentum: Double = 0.0, weightDecay: Double = 0.0): Optimizer(source)

Creates an SGD optimizer with optional momentum.

Parameters

lr

Learning rate

momentum

Momentum factor (default: 0.0)

weightDecay

Weight decay coefficient (default: 0.0)