add warnings
This commit is contained in:
parent
b99ef95719
commit
191c6a7499
|
|
@ -1,4 +1,4 @@
|
||||||
import logging
|
import warnings
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import torch
|
import torch
|
||||||
|
|
@ -134,7 +134,7 @@ class Pesq:
|
||||||
try:
|
try:
|
||||||
pesq_values.append(self.pesq(pred.squeeze(), target_.squeeze()))
|
pesq_values.append(self.pesq(pred.squeeze(), target_.squeeze()))
|
||||||
except Exception as e:
|
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))
|
return torch.tensor(np.mean(pesq_values))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue