diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-06-01 23:15:54 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-06-01 23:15:54 +0200 |
commit | 90f7e3882610945077949b96a011c92a8e7c8106 (patch) | |
tree | 6be278e48c2279f20043fba646d7e4c920957ecf /text_recognizer/networks/conformer/depth_wise_conv.py | |
parent | 729867b14754bffd98a3406b5d3a2eb9d09bc3bc (diff) |
Format
Diffstat (limited to 'text_recognizer/networks/conformer/depth_wise_conv.py')
-rw-r--r-- | text_recognizer/networks/conformer/depth_wise_conv.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/text_recognizer/networks/conformer/depth_wise_conv.py b/text_recognizer/networks/conformer/depth_wise_conv.py index 9465b7c..1dbd0b8 100644 --- a/text_recognizer/networks/conformer/depth_wise_conv.py +++ b/text_recognizer/networks/conformer/depth_wise_conv.py @@ -5,8 +5,13 @@ from torch import nn, Tensor class DepthwiseConv1D(nn.Module): def __init__(self, in_channels: int, out_channels: int, kernel_size: int) -> None: super().__init__() - self.conv = nn.Conv1d(in_channels=in_channels, out_channels=out_channels, kernel_size=kernel_size, groups=in_channels, - padding="same") + self.conv = nn.Conv1d( + in_channels=in_channels, + out_channels=out_channels, + kernel_size=kernel_size, + groups=in_channels, + padding="same", + ) def forward(self, x: Tensor) -> Tensor: return self.conv(x) |