Shortcuts

Struct GroupNormOptions

Page Contents

Struct Documentation

struct GroupNormOptions

Options for the GroupNorm module.

Example:

GroupNorm model(GroupNormOptions(2, 2).eps(2e-5).affine(false));

Public Functions

GroupNormOptions(int64_t num_groups, int64_t num_channels)
inline auto num_groups(const int64_t &new_num_groups) -> decltype(*this)

number of groups to separate the channels into

inline auto num_groups(int64_t &&new_num_groups) -> decltype(*this)
inline const int64_t &num_groups() const noexcept
inline int64_t &num_groups() noexcept
inline auto num_channels(const int64_t &new_num_channels) -> decltype(*this)

number of channels expected in input

inline auto num_channels(int64_t &&new_num_channels) -> decltype(*this)
inline const int64_t &num_channels() const noexcept
inline int64_t &num_channels() noexcept
inline auto eps(const double &new_eps) -> decltype(*this)

a value added to the denominator for numerical stability. Default: 1e-5

inline auto eps(double &&new_eps) -> decltype(*this)
inline const double &eps() const noexcept
inline double &eps() noexcept
inline auto affine(const bool &new_affine) -> decltype(*this)

a boolean value that when set to true, this module has learnable per-channel affine parameters initialized to ones (for weights) and zeros (for biases).

Default: true.

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