kaira.models.image.Yilmaz2023DeepJSCCNOMAEncoder

Inheritance diagram for Yilmaz2023DeepJSCCNOMAEncoder
- class kaira.models.image.Yilmaz2023DeepJSCCNOMAEncoder(N=64, M=16, in_ch=4, csi_length=1, *args: Any, **kwargs: Any)[source]
Bases:
Tung2022DeepJSCCQ2EncoderDeepJSCC-NOMA Encoder Module [Yilmaz et al., 2023].
This encoder transforms input images into latent representations. This class extends the Tung2022DeepJSCCQ2Encoder class with parameter adaptation as used in the paper Yilmaz et al. [2023].
Methods
Initialize the DeepJSCCNOMAEncoder.
Forward pass through the encoder.
Create model instance from configuration.
Create model from Hydra DictConfig.
Create model from Hugging Face PretrainedConfig.
Attributes
Calculate the bandwidth ratio of the model.
- __init__(N=64, M=16, in_ch=4, csi_length=1, *args: Any, **kwargs: Any)[source]
Initialize the DeepJSCCNOMAEncoder.
- Parameters:
N (int, optional) – Number of channels in the network.
M (int, optional) – Latent dimension of the bottleneck representation.
in_ch (int, optional) – Number of input channels. Defaults to 4.
csi_length (int, optional) – The number of dimensions in the CSI data. Defaults to 1.
*args – Variable positional arguments passed to the base class.
**kwargs – Variable keyword arguments passed to the base class.
- property bandwidth_ratio: float
Calculate the bandwidth ratio of the model.
- Returns:
The bandwidth ratio.
- Return type:
- forward(x: Tensor, csi: Tensor, *args: Any, **kwargs: Any) Tensor
Forward pass through the encoder.
- Parameters:
x (torch.Tensor) – The input image tensor.
csi (torch.Tensor) – Channel State Information tensor.
*args – Additional positional arguments.
**kwargs – Additional keyword arguments.
- Returns:
The encoded latent representation.
- Return type:
- classmethod from_config(config, **kwargs)
Create model instance from configuration.
- Parameters:
config – Configuration object (PretrainedConfig, DictConfig, or dict)
**kwargs – Additional parameters to override config
- Returns:
Model instance
- classmethod from_hydra_config(config: DictConfig, **kwargs)
Create model from Hydra DictConfig.
- Parameters:
config – Hydra configuration
**kwargs – Additional parameters
- Returns:
Model instance
- classmethod from_pretrained_config(config: PretrainedConfig, **kwargs)
Create model from Hugging Face PretrainedConfig.
- Parameters:
config – PretrainedConfig instance
**kwargs – Additional parameters
- Returns:
Model instance