braindecode.functional.unpack_channels#
- braindecode.functional.unpack_channels(x, ch_mask, n_chans)[source]#
Split the output of
pack_channels()back into samples and channels.- Parameters:
x (
Tensor) – Tensor of shape(n_real, ...), one row per real channel, in the orderpack_channels()returns them.ch_mask (
Optional[Tensor]) – The boolean mask of shape(batch, n_chans)given topack_channels(), orNone.n_chans (
int) – Number of channels of the padded batch.
- Returns:
Shape
(batch, n_chans, ...), zeros for the padded channels.- Return type: