mbrs.functional module#
- mbrs.functional.expectation(matrix: Tensor, lprobs: Tensor | None = None) Tensor[source]#
Compute expectation values for each row.
- Parameters:
matrix (Tensor) – Input matrix of shape (H, R).
lprobs (Tensor, optional) – Log-probabilities for each column of shape (R,).
- Returns:
Expected values for each row of shape (H,).
- Return type:
Tensor