Add french, italian, portuguese, spanish, german (#155)

The french 6 layers variant wasn't included because it's not good enough
yet. Use the `french_24l` variant for now.
This commit is contained in:
Gabriel de Marmiesse
2026-04-17 17:52:16 +02:00
committed by GitHub
parent 9fc89c64f2
commit c90fc8ced6
31 changed files with 1165 additions and 131 deletions
+9 -4
View File
@@ -10,11 +10,14 @@ class ConvDownsample1d(nn.Module):
with a kernel size of twice the stride.
"""
def __init__(self, stride: int, dimension: int):
def __init__(self, stride: int, dimension: int, out_dimension: int | None = None):
super().__init__()
if out_dimension is None:
out_dimension = dimension
self.conv = StreamingConv1d(
dimension,
dimension,
out_dimension,
kernel_size=2 * stride,
stride=stride,
groups=1,
@@ -31,10 +34,12 @@ class ConvTrUpsample1d(nn.Module):
Upsample by some integer amount `stride` using transposed convolutions.
"""
def __init__(self, stride: int, dimension: int):
def __init__(self, stride: int, dimension: int, in_dimension: int | None = None):
super().__init__()
if in_dimension is None:
in_dimension = dimension
self.convtr = StreamingConvTranspose1d(
dimension,
in_dimension,
dimension,
kernel_size=2 * stride,
stride=stride,