braindecode.modules.ChannelLayer#
- class braindecode.modules.ChannelLayer(target, strategy, chs_info=None, *, drop_non_eeg=False, trainable=False, **kwargs)[source]#
Map any montage onto
targetwith one matrix per montage.Warning
Experimental. Public API may change without a deprecation cycle.
- Parameters:
target (list of dict) – Channels the backbone consumes (
ch_name, optionalloc).strategy (str) –
"exact"(a missing target is an error),"zero","nearest","idw"(p),"spline"(reg=1e-3),"field"(reg=0) or"source"(n_parcels=64,lam=0.1,grid_mm=15,trainable: a zero-initialised parcel mixing on top of the physics)."wiener"(noise=0.01; callfit()first),"region"(mean withinradius, default 1.5 x the median input spacing) or"latent"(d_model=64,n_freqs=8: learned cross-attention from each missing target’s position over the inputs’ positions and statistics).chs_info (list of dict, optional) – Montage used when
forward()gets none.drop_non_eeg (bool) – Ignore input channels that are not electrodes instead of raising.
Methods
Examples using braindecode.modules.ChannelLayer#
Running a Pretrained Model on Any Channel Set with the Channel Layer