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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user