braindecode.modules.LearnedPositionalEncoding#
- class braindecode.modules.LearnedPositionalEncoding(length, dim, drop_prob=0.0)[source]#
Learned additive positional encoding,
dropout(x + encoding[:, :seq]).The
encodingparameter is drawn fromN(0, 1), shape(1, length, dim); a shorter sequence uses its first rows. CTNet and MSCFormer use it, so their released weights load with the same keys.- Parameters:
Methods