Spaces:
Running
Running
update
Browse files
examples/dfnet/step_2_train_model.py
CHANGED
@@ -264,7 +264,7 @@ def main():
|
|
264 |
clean_audios: torch.Tensor = clean_audios.to(device)
|
265 |
noisy_audios: torch.Tensor = noisy_audios.to(device)
|
266 |
|
267 |
-
est_spec, est_wav, est_mask, lsnr
|
268 |
|
269 |
mr_stft_loss = mr_stft_loss_fn.forward(est_wav, clean_audios)
|
270 |
neg_si_snr_loss = neg_si_snr_loss_fn.forward(est_wav, clean_audios)
|
@@ -335,7 +335,7 @@ def main():
|
|
335 |
clean_audios: torch.Tensor = clean_audios.to(device)
|
336 |
noisy_audios: torch.Tensor = noisy_audios.to(device)
|
337 |
|
338 |
-
est_spec, est_wav, est_mask, lsnr
|
339 |
|
340 |
mr_stft_loss = mr_stft_loss_fn.forward(est_wav, clean_audios)
|
341 |
neg_si_snr_loss = neg_si_snr_loss_fn.forward(est_wav, clean_audios)
|
|
|
264 |
clean_audios: torch.Tensor = clean_audios.to(device)
|
265 |
noisy_audios: torch.Tensor = noisy_audios.to(device)
|
266 |
|
267 |
+
est_spec, est_wav, est_mask, lsnr = model.forward(noisy_audios)
|
268 |
|
269 |
mr_stft_loss = mr_stft_loss_fn.forward(est_wav, clean_audios)
|
270 |
neg_si_snr_loss = neg_si_snr_loss_fn.forward(est_wav, clean_audios)
|
|
|
335 |
clean_audios: torch.Tensor = clean_audios.to(device)
|
336 |
noisy_audios: torch.Tensor = noisy_audios.to(device)
|
337 |
|
338 |
+
est_spec, est_wav, est_mask, lsnr = model.forward(noisy_audios)
|
339 |
|
340 |
mr_stft_loss = mr_stft_loss_fn.forward(est_wav, clean_audios)
|
341 |
neg_si_snr_loss = neg_si_snr_loss_fn.forward(est_wav, clean_audios)
|