Rate this Page

Class AdamW#

Inheritance Relationships#

Base Type#

Class Documentation#

class AdamW : public torch::optim::Optimizer#

Public Functions

inline explicit AdamW(const std::vector<OptimizerParamGroup> &param_groups, AdamWOptions defaults = {})#
inline explicit AdamW(std::vector<Tensor> params, AdamWOptions defaults = {})#
virtual torch::Tensor step(LossClosure closure = nullptr) override#

A loss function closure, which is expected to return the loss value.

virtual void save(serialize::OutputArchive &archive) const override#

Serializes the optimizer state into the given archive.

virtual void load(serialize::InputArchive &archive) override#

Deserializes the optimizer state from the given archive.