fix error in predict class
Browse files- classpred.py +1 -1
classpred.py
CHANGED
@@ -28,7 +28,7 @@ def preprocess(x: torch.Tensor):
|
|
28 |
return melspec
|
29 |
|
30 |
def predict_class(x, sr, start, end):
|
31 |
-
x = torch.from_numpy(x)
|
32 |
if x.ndim > 1:
|
33 |
x = x.mean(-1)
|
34 |
assert x.ndim == 1
|
|
|
28 |
return melspec
|
29 |
|
30 |
def predict_class(x, sr, start, end):
|
31 |
+
x = torch.from_numpy(x)
|
32 |
if x.ndim > 1:
|
33 |
x = x.mean(-1)
|
34 |
assert x.ndim == 1
|