braindecode.modules.SEANetResBlock#

class braindecode.modules.SEANetResBlock(dim, dilation=1, compress=2, true_skip=False, causal=False)[source]#

ELU -> conv3 -> ELU -> conv1 plus a 1x1 conv (or identity) shortcut.

Parameters:
  • dim (int) – Input and output channels.

  • dilation (int) – Dilation of the kernel-3 convolution.

  • compress (int) – The hidden branch has dim // compress channels.

  • true_skip (bool) – Identity shortcut instead of a 1x1 convolution.

  • causal (bool) – Left padding only.

Methods

forward(x)[source]#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

Return type:

Tensor