Rate this Page

Struct BatchNormOptions#

Page Contents

Struct Documentation#

struct BatchNormOptions#

Options for the BatchNorm module.

Public Functions

BatchNormOptions(int64_t num_features)#
inline 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.

inline auto num_features(int64_t &&new_num_features) -> decltype(*this)#
inline const int64_t &num_features() const noexcept#
inline int64_t &num_features() noexcept#
inline auto eps(const double &new_eps) -> decltype(*this)#

The epsilon value added for numerical stability.

Changing this parameter after construction is effective.

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

A momentum multiplier for the mean and variance.

Changing this parameter after construction is effective.

inline auto momentum(std::optional<double> &&new_momentum) -> decltype(*this)#
inline const std::optional<double> &momentum() const noexcept#
inline std::optional<double> &momentum() noexcept#
inline 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.

inline auto affine(bool &&new_affine) -> decltype(*this)#
inline const bool &affine() const noexcept#
inline bool &affine() noexcept#
inline 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.

inline auto track_running_stats(bool &&new_track_running_stats) -> decltype(*this)#
inline const bool &track_running_stats() const noexcept#
inline bool &track_running_stats() noexcept#