compute_ser#
- sionna.phy.utils.compute_ser(s: torch.Tensor, s_hat: torch.Tensor, precision: Literal['single', 'double'] = 'double') torch.Tensor[source]#
Computes the symbol error rate (SER) between two integer tensors.
- Parameters:
s (torch.Tensor) – A tensor of arbitrary shape filled with integers.
s_hat (torch.Tensor) – A tensor like
s.precision (Literal['single', 'double']) – Precision used for internal calculations and outputs. Defaults to
"double".
- Outputs:
ser – torch.float. SER.
Examples
import torch from sionna.phy.utils import compute_ser s = torch.tensor([0, 1, 2, 3]) s_hat = torch.tensor([0, 1, 3, 2]) print(compute_ser(s, s_hat).item()) # 0.5