EXITCallback#

class sionna.phy.fec.ldpc.EXITCallback(num_iter: int, device: str | None = None)[source]#

Bases: sionna.phy.object.Object

Callback for the LDPCBPDecoder to track EXIT statistics.

Can be registered as c2v_callbacks or v2c_callbacks in the LDPCBPDecoder and the LDPC5GDecoder.

This callback requires all-zero codeword simulations.

Parameters:
  • num_iter (int) – Maximum number of decoding iterations.

  • device (str | None) – Device for computation (e.g., ‘cpu’, ‘cuda:0’).

Inputs:
  • msg – [batch_size, num_vns, max_degree], torch.float. The v2c or c2v messages.

  • itint. Current number of decoding iterations.

Outputs:

msgtorch.float. Same as msg.

Examples

from sionna.phy.fec.ldpc import LDPCBPDecoder
from sionna.phy.fec.ldpc.utils import EXITCallback

# Create callback
exit_cb = EXITCallback(num_iter=20)

# Create decoder with callback
decoder = LDPCBPDecoder(pcm, v2c_callbacks=[exit_cb])

# After decoding, access mutual information
mi = exit_cb.mi

Attributes

property mi: torch.Tensor#

Mutual information after each iteration