Section Navigation
Mean over dim of the entries a mask flags.
dim
x (Tensor) – Tensor to average.
Tensor
mask (Optional[Tensor]) – Boolean mask over the leading axes of x (e.g. a ch_mask of shape (batch, n_chans)), True for the entries that count; it is broadcast over the remaining axes. None is a plain mean.
Optional
x
ch_mask
(batch, n_chans)
True
None
dim (List[int]) – Axes to average over.
List
int
x averaged over dim. Masked entries do not count, whatever they hold (even NaN).
masked_mean()