Spaces:
Running
Running
Update src/infer_pack/predictor/RMVPE.py
Browse files
src/infer_pack/predictor/RMVPE.py
CHANGED
@@ -1,7 +1,7 @@
|
|
|
|
1 |
import torch.nn as nn
|
2 |
-
import
|
3 |
import torch.nn.functional as F
|
4 |
-
from librosa.filters import mel
|
5 |
|
6 |
|
7 |
class BiGRU(nn.Module):
|
@@ -245,6 +245,10 @@ class E2E(nn.Module):
|
|
245 |
nn.Dropout(0.25),
|
246 |
nn.Sigmoid(),
|
247 |
)
|
|
|
|
|
|
|
|
|
248 |
|
249 |
def forward(self, mel):
|
250 |
mel = mel.transpose(-1, -2).unsqueeze(1)
|
@@ -253,6 +257,9 @@ class E2E(nn.Module):
|
|
253 |
return x
|
254 |
|
255 |
|
|
|
|
|
|
|
256 |
class MelSpectrogram(torch.nn.Module):
|
257 |
def __init__(
|
258 |
self,
|
|
|
1 |
+
import sys, torch, numpy as np, traceback, pdb
|
2 |
import torch.nn as nn
|
3 |
+
from time import time as ttime
|
4 |
import torch.nn.functional as F
|
|
|
5 |
|
6 |
|
7 |
class BiGRU(nn.Module):
|
|
|
245 |
nn.Dropout(0.25),
|
246 |
nn.Sigmoid(),
|
247 |
)
|
248 |
+
else:
|
249 |
+
self.fc = nn.Sequential(
|
250 |
+
nn.Linear(3 * N_MELS, N_CLASS), nn.Dropout(0.25), nn.Sigmoid()
|
251 |
+
)
|
252 |
|
253 |
def forward(self, mel):
|
254 |
mel = mel.transpose(-1, -2).unsqueeze(1)
|
|
|
257 |
return x
|
258 |
|
259 |
|
260 |
+
from librosa.filters import mel
|
261 |
+
|
262 |
+
|
263 |
class MelSpectrogram(torch.nn.Module):
|
264 |
def __init__(
|
265 |
self,
|