Adam

data class Adam(val alpha: Double = 0.001, val beta1: Double = 0.9, val beta2: Double = 0.999, val epsilon: Double = 1.0E-8, val statistics: Statistics) : MultiPassOptimizer, Statistics

Adam optimizer. Based on research paper: https://arxiv.org/pdf/1412.6980

Constructors

Link copied to clipboard
constructor(alpha: Double = 0.001, beta1: Double = 0.9, beta2: Double = 0.999, epsilon: Double = 1.0E-8, statistics: Statistics)

Properties

Link copied to clipboard
val alpha: Double = 0.001
Link copied to clipboard
val beta1: Double = 0.9
Link copied to clipboard
val beta2: Double = 0.999
Link copied to clipboard
open override val epochCount: Int
Link copied to clipboard
val epsilon: Double = 1.0E-8
Link copied to clipboard
open override val measurements: List<Measurement<*>>

Lists the measurements taken by this object.

Link copied to clipboard
open override val measurementsMax: Float
Link copied to clipboard

Functions

Link copied to clipboard
open override fun batch(cases: List<Exercise>): List<List<Exercise>>

Creates training batches out of the given cases.

Link copied to clipboard
open override fun createSnapshot(): Snapshot

Collects all measures into a single immutable object

Link copied to clipboard
open override fun data(key: Measurement<Float>): DataList<Float, Float>
Link copied to clipboard
open override fun measurementMaximum(key: Measurement<Float>): Float
Link copied to clipboard
open override fun passAgain(): Boolean

Returns true if the optimizer should perform another pass over the training data.

Link copied to clipboard
open override fun update(step: Int, epoch: Int, layer: Layer, weightGradients: Tensor, biasGradients: Tensor)

Updates the parameters of the model based on the outputs computed during the forward pass.