kaira.models.components.AFModule

Inheritance diagram for AFModule
- class kaira.models.components.AFModule(N, csi_length, *args: Any, **kwargs: Any)[source]
Bases:
BaseModelAFModule: Attention-Feature Module [Xu et al., 2021].
This module implements a an attention mechanism that recalibrates feature maps by explicitly modeling interdependencies between channel state information and the input features. This module allows the same model to be used during training and testing across channels with different signal-to-noise ratio without significant performance degradation.
Methods
Initialize the AFModule.
Forward pass through the AFModule.
Examples using
kaira.models.components.AFModule- forward(x: Tensor, csi: Tensor, *args: Any, **kwargs: Any) Tensor[source]
Forward pass through the AFModule.
- Parameters:
x (torch.Tensor) – The input tensor.
csi (torch.Tensor) – Channel State Information tensor.
*args – Additional positional arguments (unused).
**kwargs – Additional keyword arguments (unused).
- Returns:
The output tensor after applying the attention mechanism.
- Return type: