Struct LayerNormOptions
Defined in File normalization.h
Page Contents
Struct Documentation
-
struct LayerNormOptions
Options for the
LayerNorm
module.Example:
LayerNorm model(LayerNormOptions({2, 2}).elementwise_affine(false).eps(2e-5));
Public Functions
-
inline auto normalized_shape(const std::vector<int64_t> &new_normalized_shape) -> decltype(*this)
input shape from an expected input.
-
inline auto eps(const double &new_eps) -> decltype(*this)
a value added to the denominator for numerical stability.
Default: 1e-5
.
-
inline auto normalized_shape(const std::vector<int64_t> &new_normalized_shape) -> decltype(*this)