PyTorch Blocks¶
Here can be found all blocks implemented in PyTorch for the architecture’s implementation in that framework.
Convolutional block of YiboGao's model |
|
Attention branch of YiboGao's model |
|
|
Residual-based Temporal Attention (RTA) block. |
Squeeze-and-Excitation Module. |
|
Densenet Transition Block for CaiWenjuan model. |
|
Densenet convolution block. |
|
Densenet dense block. |
|
Spatial Attention module of ZhangJin's model. |
|
Temporal attention module of ZhangJin's Model. |
- TSFEDL.blocks_pytorch.ConvBlockYiboGao(in_features, nb_filter, kernel_size)[source]¶
Convolutional block of YiboGao’s model
- Parameters:
in_features (int) – Number of input features.
nb_filter (int) – Number of filters for the convolution.
kernel_size (int) – Size of the convolution kernel.
- TSFEDL.blocks_pytorch.AttentionBranchYiboGao(in_features, nb_filter, kernel_size)[source]¶
Attention branch of YiboGao’s model
- Parameters:
in_features (int) – Number of input features.
nb_filter (int) – Number of filters for the convolution.
kernel_size (int) – Size of the convolution kernel.
- TSFEDL.blocks_pytorch.RTABlock(in_features, nb_filter, kernel_size)[source]¶
Residual-based Temporal Attention (RTA) block.
References
Gao, Y., Wang, H., & Liu, Z. (2021). An end-to-end atrial fibrillation detection by a novel residual-based temporal attention convolutional neural network with exponential nonlinearity loss. Knowledge-Based Systems, 212, 106589.
- Parameters:
in_features (int) – Number of input features.
nb_filter (int) – Number of filters for the convolution.
kernel_size (int) – Size of the convolution kernel.
- TSFEDL.blocks_pytorch.SqueezeAndExcitationModule(in_features: int, dense_units: int)[source]¶
Squeeze-and-Excitation Module.
References
Squeeze-and-Excitation Networks, Jie Hu, Li Shen, Samuel Albanie, Gang Sun, Enhua Wu (arXiv:1709.01507v4)
- Parameters:
in_features (int) – The number of input features (channels)
dense_units (int) – The number units on each dense layer.
- Returns:
se – Output tensor for the block.
- Return type:
torch.Tensor
- TSFEDL.blocks_pytorch.DenseNetTransitionBlock(in_features, reduction)[source]¶
Densenet Transition Block for CaiWenjuan model.
- Parameters:
in_features (int) – The number of input features (channels)
reduction (float) – Number between 0 and 1 representing the percentage reduction on the number of units.
- TSFEDL.blocks_pytorch.DenseNetConvBlock(in_features, growth_rate)[source]¶
Densenet convolution block.
- Parameters:
in_features (int) – The number of input features (channels)
growth_rate (int) – Growth rate of the number of units in the layers.
- TSFEDL.blocks_pytorch.DenseNetDenseBlock(in_features, layers, growth_rate)[source]¶
Densenet dense block.
- Parameters:
in_features (int) – The number of input features (channels)
layers (int) – Number of layers of the block.
growth_rate (int) – Growth rate of the number of units in the layers.