braindecode.modules.GCT#

class braindecode.modules.GCT(in_channels)[source]#

Gated Channel Transformation from [Yang2020].

Parameters:

in_channels (int) – number of input feature channels

Examples

>>> import torch
>>> from braindecode.modules import GCT
>>> module = GCT(in_channels=16)
>>> inputs = torch.randn(2, 16, 1, 64)
>>> outputs = module(inputs)
>>> outputs.shape
torch.Size([2, 16, 1, 64])

References

[Yang2020]

Yang, Z. Linchao, Z., Wu, Y., Yang, Y., 2020. Gated Channel Transformation for Visual Recognition. CVPR 2020.

Methods

forward(x, eps=1e-05)[source]#

Apply the Gated Channel Transformation block to the input tensor.

Parameters:
  • x (Pytorch.Tensor)

  • eps (float, default=1e-5)

Returns:

the original tensor x multiplied by the gate.

Return type:

Pytorch.Tensor