vkML 0.1.0

LayerNorm

Layer normalisation with an optional affine transform.

class LayerNorm : Modulepython/vkml/nn.py:814

Calls layer_norm for the normalisation, then applies weight and bias itself — the operator is the normalisation alone, and this layer owns the affine part.

Construction

__init__

def __init__self, normalized_shape, eps: float=1e-05, elementwise_affine: bool=Truepython/vkml/nn.py:821

Forward

forward

def forwardself, x: V.Tensor -> V.Tensorpython/vkml/nn.py:835

Internals

__repr__

def __repr__self -> strpython/vkml/nn.py:841

See also layer_norm, rms_norm, BatchNorm2d, Module

vkML — Vulkan-first machine learning in C++20. Apache-2.0. Signatures on this page are generated from the installed module.