Shortcuts

Struct BatchNormFuncOptions

Page Contents

Struct Documentation

struct torch::nn::functional::BatchNormFuncOptions

Options for torch::nn::functional::batch_norm.

Example:

namespace F = torch::nn::functional;
F::batch_norm(input, mean, variance, F::BatchNormFuncOptions().weight(weight).bias(bias).momentum(0.1).eps(1e-05).training(false));

Public Functions

auto weight(const Tensor &new_weight) -> decltype(*this)
auto weight(Tensor &&new_weight) -> decltype(*this)
const Tensor &weight() const noexcept
Tensor &weight() noexcept
auto bias(const Tensor &new_bias) -> decltype(*this)
auto bias(Tensor &&new_bias) -> decltype(*this)
const Tensor &bias() const noexcept
Tensor &bias() noexcept
auto training(const bool &new_training) -> decltype(*this)
auto training(bool &&new_training) -> decltype(*this)
const bool &training() const noexcept
bool &training() noexcept
auto momentum(const c10::optional<double> &new_momentum) -> decltype(*this)

A momentum multiplier for the mean and variance.

Changing this parameter after construction is effective.

auto momentum(c10::optional<double> &&new_momentum) -> decltype(*this)
const c10::optional<double> &momentum() const noexcept
c10::optional<double> &momentum() noexcept
auto eps(const double &new_eps) -> decltype(*this)

The epsilon value added for numerical stability.

Changing this parameter after construction is effective.

auto eps(double &&new_eps) -> decltype(*this)
const double &eps() const noexcept
double &eps() 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