Class LayerNorm

Inheritance Relationships

Base Type

Derived Type

Class Documentation

class LayerNorm : public mindspore::ops::PrimitiveC

Applies the Layer Normalization to the input tensor. Refer to Python API mindspore.ops.LayerNorm for more details.

Subclassed by mindspore::ops::LayerNormFusion

Public Functions

inline LayerNorm()

Constructor.

~LayerNorm() = default

Destructor.

void Init(const int64_t begin_norm_axis = 1, const int64_t begin_params_axis = 1, const float epsilon = 1e-7)

Init. Refer to the parameters of Python API mindspore.ops.LayerNorm for the inputs.

void set_begin_norm_axis(const int64_t begin_norm_axis)

Set begin_norm_axis.

void set_begin_params_axis(const int64_t begin_params_axis)

Set begin_params_axis.

void set_epsilon(const float epsilon)

Set epsilon.

int64_t get_begin_norm_axis() const

Get begin_norm_axis.

Returns

begin_norm_axis.

int64_t get_begin_params_axis() const

Get begin_params_axis.

Returns

begin_params_axis.

float get_epsilon() const

Get epsilon.

Returns

epsilon.