Shortcuts

Struct ThresholdOptions

Page Contents

Struct Documentation

struct torch::nn::ThresholdOptions

Options for the Threshold module.

Example:

Threshold model(ThresholdOptions(42.42, 24.24).inplace(true));

Public Functions

ThresholdOptions(double threshold, double value)
auto threshold(const double &new_threshold) -> decltype(*this)

The value to threshold at.

auto threshold(double &&new_threshold) -> decltype(*this)
const double &threshold() const noexcept
double &threshold() noexcept
auto value(const double &new_value) -> decltype(*this)

The value to replace with.

auto value(double &&new_value) -> decltype(*this)
const double &value() const noexcept
double &value() noexcept
auto inplace(const bool &new_inplace) -> decltype(*this)

can optionally do the operation in-place. Default: False

auto inplace(bool &&new_inplace) -> decltype(*this)
const bool &inplace() const noexcept
bool &inplace() noexcept

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