Spaces:
Running
Running
update
Browse files
examples/clean_unet_aishell/step_2_train_model.py
CHANGED
@@ -235,6 +235,11 @@ def main():
|
|
235 |
|
236 |
enhanced_audios = model.forward(noisy_audios)
|
237 |
enhanced_audios = torch.squeeze(enhanced_audios, dim=1)
|
|
|
|
|
|
|
|
|
|
|
238 |
if torch.any(torch.isnan(enhanced_audios)) or torch.any(torch.isinf(enhanced_audios)):
|
239 |
raise AssertionError("nan or inf in enhanced_audios")
|
240 |
|
|
|
235 |
|
236 |
enhanced_audios = model.forward(noisy_audios)
|
237 |
enhanced_audios = torch.squeeze(enhanced_audios, dim=1)
|
238 |
+
|
239 |
+
if torch.any(torch.isnan(clean_audios)) or torch.any(torch.isinf(clean_audios)):
|
240 |
+
raise AssertionError("nan or inf in clean_audios")
|
241 |
+
if torch.any(torch.isnan(noisy_audios)) or torch.any(torch.isinf(noisy_audios)):
|
242 |
+
raise AssertionError("nan or inf in noisy_audios")
|
243 |
if torch.any(torch.isnan(enhanced_audios)) or torch.any(torch.isinf(enhanced_audios)):
|
244 |
raise AssertionError("nan or inf in enhanced_audios")
|
245 |
|