kaira.models.BaseModel

Inheritance diagram of BaseModel

Inheritance diagram for BaseModel

class kaira.models.BaseModel(*args: Any, **kwargs: Any)[source]

Bases: Module, ABC

Abstract base class for all models in the Kaira framework.

This class extends PyTorch’s nn.Module and adds framework-specific functionality. All models should inherit from this class to ensure compatibility with the framework’s training, evaluation, and inference pipelines.

The class provides a consistent interface for model implementation while allowing flexibility in architecture design. It enforces proper initialization and forward pass implementation.

Methods

__init__

Initialize the model.

forward

Define the forward pass computation.

Examples using kaira.models.BaseModel

Attention-Feature Module (AFModule)

Attention-Feature Module (AFModule)

Original DeepJSCC Model (Bourtsoulatze 2019)

Original DeepJSCC Model (Bourtsoulatze 2019)

Complex Projections for Wireless Communications

Complex Projections for Wireless Communications

Deep Joint Source-Channel Coding (DeepJSCC) Model

Deep Joint Source-Channel Coding (DeepJSCC) Model

Multiple Access Channel Model for Joint Encoding

Multiple Access Channel Model for Joint Encoding

Projections and Cover Tests for Communication Systems

Projections and Cover Tests for Communication Systems

Sequential Model for Modular Neural Network Design

Sequential Model for Modular Neural Network Design

Discrete Task-Oriented Deep JSCC Model (Xie 2023)

Discrete Task-Oriented Deep JSCC Model (Xie 2023)

FEC Decoders Tutorial

FEC Decoders Tutorial

FEC Encoders Tutorial

FEC Encoders Tutorial

LDPC Coding and Belief Propagation Decoding

LDPC Coding and Belief Propagation Decoding

Syndrome Decoding Visualization

Syndrome Decoding Visualization
__init__(*args: Any, **kwargs: Any)[source]

Initialize the model.

Parameters:
  • *args – Variable positional arguments.

  • **kwargs – Variable keyword arguments.

abstract forward(*args: Any, **kwargs: Any) Any[source]

Define the forward pass computation.

This method should be implemented by all subclasses to define how input data is processed through the model to produce output.

Parameters:
  • *args – Variable positional arguments for flexible input handling

  • **kwargs – Variable keyword arguments for optional parameters

Returns:

Model output, type depends on specific implementation

Return type:

Any

Raises:

NotImplementedError – If the subclass does not implement this method