Package-level declarations

Types

Link copied to clipboard
class AdamOptimizer @JvmOverloads constructor(lr: Double = 0.001, beta1: Double = 0.9, beta2: Double = 0.999, epsilon: Double = 1.0E-8, weightDecay: Double = 0.0, decoupledWeightDecay: Boolean = true, amsgrad: Boolean = false) : Optimizer

Adam optimizer (Adaptive Moment Estimation).

Link copied to clipboard
interface Optimizer

Minimal optimizer surface for training.

Link copied to clipboard
class SgdOptimizer @JvmOverloads constructor(lr: Double, momentum: Double = 0.0, weightDecay: Double = 0.0) : Optimizer

Stochastic Gradient Descent optimizer with optional momentum and weight decay.

Functions

Link copied to clipboard
fun adam(lr: Double = 0.001, beta1: Double = 0.9, beta2: Double = 0.999, epsilon: Double = 1.0E-8, weightDecay: Double = 0.0, decoupledWeightDecay: Boolean = true, amsgrad: Boolean = false): Optimizer

Factory function for Adam optimizer.

Link copied to clipboard
fun adamw(lr: Double = 0.001, beta1: Double = 0.9, beta2: Double = 0.999, epsilon: Double = 1.0E-8, weightDecay: Double = 0.01): Optimizer

Factory function for AdamW optimizer (Adam with decoupled weight decay). This is equivalent to adam() with decoupledWeightDecay=true.

Link copied to clipboard
fun sgd(lr: Double, momentum: Double = 0.0, weightDecay: Double = 0.0): Optimizer

Small factory for SGD optimizer.