add non_integer stride
Browse files- model.safetensors +1 -1
- modeling.py +2 -2
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 378849388
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1bb1424da58b5a57115b2aae77c43fb8270d40005f695cad3a4ba6f6090e2552
|
| 3 |
size 378849388
|
modeling.py
CHANGED
|
@@ -36,11 +36,11 @@ class SfiHuBERTModel(HubertModel):
|
|
| 36 |
return super().forward(*args, **kwargs)
|
| 37 |
|
| 38 |
def set_sample_rate(self, sample_rate):
|
| 39 |
-
sample_rate = int(sample_rate)
|
| 40 |
if sample_rate not in self.config.sfi_conv_parameters:
|
| 41 |
raise ValueError(
|
| 42 |
f"Sample rate {sample_rate} not in the list of allowed sample rates."
|
| 43 |
)
|
| 44 |
self.feature_extractor.conv_layers[0].conv.prepare(
|
| 45 |
-
sample_rate=sample_rate, **self.config.sfi_conv_parameters[sample_rate]
|
| 46 |
)
|
|
|
|
| 36 |
return super().forward(*args, **kwargs)
|
| 37 |
|
| 38 |
def set_sample_rate(self, sample_rate):
|
| 39 |
+
sample_rate = str(int(sample_rate))
|
| 40 |
if sample_rate not in self.config.sfi_conv_parameters:
|
| 41 |
raise ValueError(
|
| 42 |
f"Sample rate {sample_rate} not in the list of allowed sample rates."
|
| 43 |
)
|
| 44 |
self.feature_extractor.conv_layers[0].conv.prepare(
|
| 45 |
+
sample_rate=int(sample_rate), **self.config.sfi_conv_parameters[sample_rate]
|
| 46 |
)
|