kaira.models.image.Tung2022DeepJSCCQ2Decoder

Inheritance diagram for Tung2022DeepJSCCQ2Decoder
- class kaira.models.image.Tung2022DeepJSCCQ2Decoder(N: int, M: int, out_ch: int = 3, csi_length: int = 1, *args: Any, **kwargs: Any)[source]
Bases:
BaseModelDeepJSCCQ2 Decoder Module [Tung et al., 2022].
This module is from the conference paper, not the journal version. Note that this module is different than DeepJSCCQ, which contains 4 strided layers and does not contain the AFModule.
This module decodes a latent representation into an image using a series of convolutional layers and AFModules.
Methods
Initialize the DeepJSCCQ2Decoder.
Forward pass through the decoder.
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: int, M: int, out_ch: int = 3, csi_length: int = 1, *args: Any, **kwargs: Any) None[source]
Initialize the DeepJSCCQ2Decoder.
- Parameters:
N (int) – The number of channels in the input and output feature maps of the neural network.
M (int) – The number of input channels for the AttentionBlock and ResidualBlock modules.
out_ch (int, optional) – The number of output channels. Defaults to 3.
csi_length (int, optional) – The number of dimensions in the CSI (Channel State Information) data.
*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[source]
Forward pass through the decoder.
- Parameters:
x (torch.Tensor) – The encoded latent representation tensor.
csi (torch.Tensor) – Channel State Information tensor.
*args – Additional positional arguments.
**kwargs – Additional keyword arguments.
- Returns:
The decoded image.
- 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