Skip to content

Transformers¤

Module: generative_models.core.layers.transformers

Source: generative_models/core/layers/transformers.py

Overview¤

Transformer implementation with flexible positional encodings - FINAL CORRECTED VERSION.

This module provides transformer encoder and decoder implementations that support various types of positional encodings using the latest Flax NNX API.

Classes¤

FeedForwardNetwork¤

class FeedForwardNetwork

TransformerDecoder¤

class TransformerDecoder

TransformerDecoderBlock¤

class TransformerDecoderBlock

TransformerEncoder¤

class TransformerEncoder

TransformerEncoderBlock¤

class TransformerEncoderBlock

Functions¤

call¤

def __call__()

call¤

def __call__()

call¤

def __call__()

call¤

def __call__()

call¤

def __call__()

init¤

def __init__()

init¤

def __init__()

init¤

def __init__()

init¤

def __init__()

init¤

def __init__()

create_attention_mask¤

def create_attention_mask()

create_transformer¤

def create_transformer()

Module Statistics¤

  • Classes: 5
  • Functions: 12
  • Imports: 6