# core.trainers.mixins.optimizer – Axolotl

# core.trainers.mixins.optimizer

`core.trainers.mixins.optimizer`

Module for Axolotl trainer optimizer mixin

## Classes

Name | Description
--- | ---
OptimizerInitMixin | Mixin to handle common optimizer initialization logic for Trainers (mostly TRL) that do not
OptimizerMixin | Mixin class for shared handling of building custom optimizers

### OptimizerInitMixin

    core.trainers.mixins.optimizer.OptimizerInitMixin(*args, **kwargs)

Mixin to handle common optimizer initialization logic for Trainers (mostly TRL) that do not accept optimizer_cls_and_kwargs as kwarg in constructor.

### OptimizerMixin

    core.trainers.mixins.optimizer.OptimizerMixin()

Mixin class for shared handling of building custom optimizers