braindecode.functional.pack_channels#
- braindecode.functional.pack_channels(x, ch_mask=None)[source]#
Merge the batch and channel axes and drop the padded channels.
For a stage that encodes each channel on its own, so that no compute is spent on padding.
unpack_channels()puts the channels back.- Parameters:
- Returns:
Shape
(n_real, ...): the real channels, sample by sample, in the order of the input ((batch * n_chans, ...)withoutch_mask).- Return type: