From 191c6a7499d2f3806553f3c5bba23557b14052b0 Mon Sep 17 00:00:00 2001 From: shahules786 Date: Tue, 15 Nov 2022 21:50:24 +0530 Subject: [PATCH] add warnings --- mayavoz/loss.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mayavoz/loss.py b/mayavoz/loss.py index 9955efd..f9c8ec4 100644 --- a/mayavoz/loss.py +++ b/mayavoz/loss.py @@ -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))