Shortcuts

Struct SGDOptions

Inheritance Relationships

Base Type

Struct Documentation

struct SGDOptions : public torch::optim::OptimizerCloneableOptions<SGDOptions>

Public Functions

SGDOptions(double lr)
inline auto lr(const double &new_lr) -> decltype(*this)
inline auto lr(double &&new_lr) -> decltype(*this)
inline const double &lr() const noexcept
inline double &lr() noexcept
inline auto momentum(const double &new_momentum) -> decltype(*this)
inline auto momentum(double &&new_momentum) -> decltype(*this)
inline const double &momentum() const noexcept
inline double &momentum() noexcept
inline auto dampening(const double &new_dampening) -> decltype(*this)
inline auto dampening(double &&new_dampening) -> decltype(*this)
inline const double &dampening() const noexcept
inline double &dampening() noexcept
inline auto weight_decay(const double &new_weight_decay) -> decltype(*this)
inline auto weight_decay(double &&new_weight_decay) -> decltype(*this)
inline const double &weight_decay() const noexcept
inline double &weight_decay() noexcept
inline auto nesterov(const bool &new_nesterov) -> decltype(*this)
inline auto nesterov(bool &&new_nesterov) -> decltype(*this)
inline const bool &nesterov() const noexcept
inline bool &nesterov() noexcept
virtual void serialize(torch::serialize::InputArchive &archive) override
virtual void serialize(torch::serialize::OutputArchive &archive) const override
virtual double get_lr() const override
virtual void set_lr(const double lr) override

Friends

friend bool operator==(const SGDOptions &lhs, const SGDOptions &rhs)

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources