kaira.models.binary.soft_bit_thresholding.SoftBitThresholder

Inheritance diagram for SoftBitThresholder
- class kaira.models.binary.soft_bit_thresholding.SoftBitThresholder(dtype: dtype | None = None, device: device | str | None = None, *args: Any, **kwargs: Any)[source]
Bases:
BaseModelBase class for soft bit thresholding techniques.
This abstract class defines the interface for soft bit thresholders that convert soft bit representations (e.g., probabilities, LLRs) to hard binary decisions.
Soft bit thresholding is a key technique in modern communication systems for extracting reliable information from noisy channel outputs.
Implementers must override the forward method.
Methods
Initialize the soft bit thresholder.
Apply thresholding to convert soft bit values to hard decisions.
Move the model to the specified device.
- __init__(dtype: dtype | None = None, device: device | str | None = None, *args: Any, **kwargs: Any)[source]
Initialize the soft bit thresholder.
- Parameters:
dtype – The data type for tensors used by this model.
device – The device (CPU/CUDA) where tensors should be allocated.
*args – Variable positional arguments passed to the base class.
**kwargs – Variable keyword arguments passed to the base class.
- to(device: str | device, *args, **kwargs) SoftBitThresholder[source]
Move the model to the specified device.
- Parameters:
device – The device to move the model to.
*args – Additional positional arguments for nn.Module.to().
**kwargs – Additional keyword arguments for nn.Module.to().
- Returns:
Self for method chaining.
- forward(x: Tensor, *args: Any, **kwargs: Any) Tensor[source]
Apply thresholding to convert soft bit values to hard decisions.
- Parameters:
x – Input tensor of soft bit values.
*args – Additional positional arguments.
**kwargs – Additional keyword arguments.
- Returns:
Tensor of hard bit decisions (0.0 or 1.0).