TORCHMIX 🧩
GitHubGitHub (opens in a new tab)
  • Introduction
  • Component Class
  • Global Configurations
  • Config-only Mode
  • Examples
    • ViT
    • BERT
    • GPT
  • Components
    • Attention
    • WindowAttention
    • Feedforward
    • PositionalEmbedding
    • SinusoidalEmbedding
    • VocabEmbedding
    • PatchEmbedding
    • ClassEmbedding
    • AvgPool
    • ClassPool
    • PatchMerge
    • Add
    • Mul
    • Attach
    • Dropout
    • DropPath
    • StochasticDepth
    • PreNorm
    • PostNorm
    • Repeat
  • Plugins
    • CausalMask
    • DropAttention
    • DropProjection
    • RelativePositionBias
    • RelativePositionBiasViT
    • RotaryEmbedding
    • SubNorm
    • DropActivation
    • DropProjectionIn
    • DropProjectionOut
    • Transpose
  • Introduction
  • Component Class
  • Global Configurations
  • Config-only Mode
  • Examples
    • ViT
    • BERT
    • GPT
  • Components
    • Attention
    • WindowAttention
    • Feedforward
    • PositionalEmbedding
    • SinusoidalEmbedding
    • VocabEmbedding
    • PatchEmbedding
    • ClassEmbedding
    • AvgPool
    • ClassPool
    • PatchMerge
    • Add
    • Mul
    • Attach
    • Dropout
    • DropPath
    • StochasticDepth
    • PreNorm
    • PostNorm
      • Forward
    • Repeat
  • Plugins
    • CausalMask
    • DropAttention
    • DropProjection
    • RelativePositionBias
    • RelativePositionBiasViT
    • RotaryEmbedding
    • SubNorm
    • DropActivation
    • DropProjectionIn
    • DropProjectionOut
    • Transpose

On This Page

  • Forward
Question? Give us feedback → (opens in a new tab)Edit this page
Components
PostNorm

PostNorm

Apply Post-Layer normalization to a children

PreNorm(
    nn.Sequential(
        nn.Linear(100, 200),
        nn.GELU(),
        nn.Linear(200, 100)
    ),
    dim=100
)

Forward

(x: torch.Tensor) -> torch.Tensor
PreNormRepeat