Shortcuts

Struct SGDOptions

Inheritance Relationships

Base Type

Struct Documentation

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

Public Functions

SGDOptions(double lr)
auto lr(const double &new_lr) -> decltype(*this)
auto lr(double &&new_lr) -> decltype(*this)
const double &lr() const noexcept
double &lr() noexcept
auto momentum(const double &new_momentum) -> decltype(*this)
auto momentum(double &&new_momentum) -> decltype(*this)
const double &momentum() const noexcept
double &momentum() noexcept
auto dampening(const double &new_dampening) -> decltype(*this)
auto dampening(double &&new_dampening) -> decltype(*this)
const double &dampening() const noexcept
double &dampening() noexcept
auto weight_decay(const double &new_weight_decay) -> decltype(*this)
auto weight_decay(double &&new_weight_decay) -> decltype(*this)
const double &weight_decay() const noexcept
double &weight_decay() noexcept
auto nesterov(const bool &new_nesterov) -> decltype(*this)
auto nesterov(bool &&new_nesterov) -> decltype(*this)
const bool &nesterov() const noexcept
bool &nesterov() noexcept
void serialize(torch::serialize::InputArchive &archive) override
void serialize(torch::serialize::OutputArchive &archive) const override
~SGDOptions() override = default
double get_lr() const override
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