Shortcuts

Struct BatchNormOptions

Page Contents

Struct Documentation

struct torch::nn::BatchNormOptions

Options for the BatchNorm module.

Public Functions

BatchNormOptions(int64_t num_features)
auto num_features(const int64_t &new_num_features) -> decltype(*this)

The number of features of the input tensor.

Changing this parameter after construction has no effect.

auto num_features(int64_t &&new_num_features) -> decltype(*this)
const int64_t &num_features() const noexcept
int64_t &num_features() 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
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 affine(const bool &new_affine) -> decltype(*this)

Whether to learn a scale and bias that are applied in an affine transformation on the input.

Changing this parameter after construction has no effect.

auto affine(bool &&new_affine) -> decltype(*this)
const bool &affine() const noexcept
bool &affine() noexcept
auto track_running_stats(const bool &new_track_running_stats) -> decltype(*this)

Whether to store and update batch statistics (mean and variance) in the module.

Changing this parameter after construction has no effect.

auto track_running_stats(bool &&new_track_running_stats) -> decltype(*this)
const bool &track_running_stats() const noexcept
bool &track_running_stats() 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