neuraltrain.models.common.ChannelMerger¶
- pydantic model neuraltrain.models.common.ChannelMerger[source][source]¶
Configuration for the ChannelMerger module.
- Parameters:
embed_ref – Also embed the reference position, e.g. to enable handling bipolar channels. This requires passing both positions and ref_positions to forward().
dropout_around_channel – If True, randomly sample a channel to apply dropout around. If False, randomly sample a point in [0, 1] ^ D, where D is the number of dimensions (2 or 3), around which to apply dropout.
unmerge – If True, unmerge (rather than merge) channels. This is useful to compute the inverse operation of a default ChannelMerger. In this case, the input to forward() should be of shape (B, n_virtual_channels, T).
invalid_value –
If all position dimensions for a channel are equal to invalid_value, the channel will be masked out. This is useful when examples within a batch contain different channels and therefore some channels need to be ignored for some of the examples.
NOTE: ns.extractors.ChannelPositions defines this value as well.
- Fields:
- field fourier_emb_config: FourierEmb = FourierEmb(n_freqs=None, total_dim=288, n_dims=2, margin=0.2)[source]¶