kiwi.modules.common.layer_norm

Module Contents

Classes

TFLayerNorm

Construct a layer normalization module with epsilon inside the

class kiwi.modules.common.layer_norm.TFLayerNorm(hidden_size, eps=1e-06)

Bases: torch.nn.Module

Construct a layer normalization module with epsilon inside the square root (tensorflow style).

This is equivalent to HuggingFace’s BertLayerNorm module.

forward(self, x)