add warnings

This commit is contained in:
shahules786 2022-11-15 21:50:24 +05:30
parent b99ef95719
commit 191c6a7499
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
import logging
import warnings
import numpy as np
import torch
@ -134,7 +134,7 @@ class Pesq:
try:
pesq_values.append(self.pesq(pred.squeeze(), target_.squeeze()))
except Exception as e:
logging.warning(f"{e} error occured while calculating PESQ")
warnings.warn(f"{e} error occured while calculating PESQ")
return torch.tensor(np.mean(pesq_values))