Layernorm#
Layernorm
Enumerations | |
enum | miopenNormMode_t { MIOPEN_ELEMENTWISE_AFFINE = 0 , MIOPEN_WEIGHT_BIAS } |
Functions | |
miopenStatus_t | miopenLayerNormForward (miopenHandle_t handle, miopenNormMode_t mode, const miopenTensorDescriptor_t xDesc, const void *x, const miopenTensorDescriptor_t weightDesc, const void *weight, const miopenTensorDescriptor_t biasDesc, const void *bias, const float epsilon, const int32_t normalized_dim, const miopenTensorDescriptor_t yDesc, void *y, const miopenTensorDescriptor_t meanDesc, void *mean, const miopenTensorDescriptor_t rstdDesc, void *rstd) |
Execute a layernorm forward layer. More... | |
Detailed Description
Enumeration Type Documentation
◆ miopenNormMode_t
enum miopenNormMode_t |
Function Documentation
◆ miopenLayerNormForward()
miopenStatus_t miopenLayerNormForward | ( | miopenHandle_t | handle, |
miopenNormMode_t | mode, | ||
const miopenTensorDescriptor_t | xDesc, | ||
const void * | x, | ||
const miopenTensorDescriptor_t | weightDesc, | ||
const void * | weight, | ||
const miopenTensorDescriptor_t | biasDesc, | ||
const void * | bias, | ||
const float | epsilon, | ||
const int32_t | normalized_dim, | ||
const miopenTensorDescriptor_t | yDesc, | ||
void * | y, | ||
const miopenTensorDescriptor_t | meanDesc, | ||
void * | mean, | ||
const miopenTensorDescriptor_t | rstdDesc, | ||
void * | rstd | ||
) |
Execute a layernorm forward layer.
- Parameters
-
handle MIOpen handle (input) mode LayerNorm mode (input) xDesc Tensor descriptor for data input tensor x (input) x Data tensor x (input) weightDesc Tensor descriptor for data input tensor weight (input) weight Data tensor weight (input) biasDesc Tensor descriptor for data input tensor bias (input) bias Data tensor bias (input) epsilon Value to stablize inverse variance calculation (input) normalized_dim Nomalized dimensions in the input array (input) yDesc Tensor descriptor for output data tensor y (input) y Data tensor y (output) meanDesc Tensor descriptor for output data tensor mean (input) mean Data tensor mean (output) rstdDesc Tensor descriptor for output data tensor rstd (input) rstd Data tensor rstd (output)
- Returns
- miopenStatus_t