Skip to main content

Crate burn_optim

Crate burn_optim 

Source
Expand description

Burn optimizers.

Modules§

decay
Weight decay module for optimizers.
grad_clipping
Gradient clipping module.
lr_schedulerstd
Learning rate scheduler module.
module_optimizer
Adaptor module for optimizers.
momentum
Momentum module for optimizers.
record
Record module for optimizers.

Structs§

AdaGrad
AdaGrad optimizer
AdaGradConfig
AdaGrad configuration.
AdaGradState
AdaGrad state.
Adam
Adam optimizer.
AdamConfig
Adam configuration.
AdamState
Adam state.
AdamW
AdamW optimizer.
AdamWConfig
AdamW Configuration.
AdamWState
AdamW state.
Adan
Adan optimizer.
AdanConfig
Adan Configuration.
AdanState
Adan state.
AdaptiveMomentumState
Adaptive momentum state.
AdaptiveNesterovMomentumState
Adaptive Nesterov momentum state.
CenteredState
CenteredState is to store and pass optimizer step params.
DynState
A type-erased optimizer state for a single parameter.
GradientsAccumulator
Accumulate gradients into a single GradientsParams object.
GradientsParams
Data type that contains gradients for parameters.
LBFGS
L-BFGS optimizer.
LBFGSConfig
LBFGS Configuration.
LBFGSState
L-BFGS optimizer state
LrDecayState
Learning rate decay state (also includes sum state).
ModuleOptimizer
Optimizes a whole module by applying a per-parameter Optimizer to each of its parameters.
MultiGradientsParams
Exposes multiple gradients for each parameter.
Muon
Muon optimizer.
MuonConfig
Muon configuration.
MuonState
Muon state.
OptimizerRecord
A serialized optimizer state, stored in the burnpack format.
RmsProp
Optimizer that implements stochastic gradient descent with momentum. The optimizer can be configured with RmsPropConfig.
RmsPropConfig
Configuration to create the RmsProp optimizer.
RmsPropMomentum
RmsPropMomentum is to store config status for optimizer. (, which is stored in optimizer itself and not passed in during step() calculation)
RmsPropMomentumState
RmsPropMomentumState is to store and pass optimizer step params.
RmsPropState
State of RmsProp
Sgd
Optimizer that implements stochastic gradient descent with momentum.
SgdConfig
Configuration to create the Sgd optimizer.
SgdState
State of Sgd.
SquareAvgState
SquareAvgState is to store and pass optimizer step params.
StateSink
Accumulates the named tensors and scalars produced while flattening a RecordState.
StateSource
Provides the named tensors and scalars consumed while reconstructing an RecordState.

Enums§

AdjustLrFn
Learning rate adjustment method for Muon optimizer.
GradAdaptor
Wrapper to unify the remove method for GradientsParams and MultiGradientsParams.
LineSearchFn
Strategy for the line search optimization phase

Traits§

DynOptimizer
Object-safe view over an Optimizer, allowing ModuleOptimizer to stay non-generic. Rank-generic operations are dispatched on a runtime rank.
Optimizer
An opinionated trait to simplify the process of implementing an optimizer.
RecordState
A type that can be flattened into named tensors and scalars and rebuilt from them.

Functions§

join_index
Join a prefix and a numeric index into a dot-separated path ("prefix.3").
join_path
Join a prefix and a leaf into a dot-separated path ("prefix.leaf").

Type Aliases§

LearningRate
Type alias for the learning rate.

Derive Macros§

RecordState
Derive macro for a recordable state (optimizer or learning-rate scheduler), decomposing it into named tensors and scalars for the burnpack format.