From fc84f7abf54d68427ab6d72f5745a96fd58f7c28 Mon Sep 17 00:00:00 2001 From: Paul Goyes Date: Fri, 6 Oct 2023 13:28:14 -0500 Subject: [PATCH 1/2] Update main.py add netdir to self.args in the init main --- main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/main.py b/main.py index 84fa42c..9687d2c 100644 --- a/main.py +++ b/main.py @@ -55,6 +55,7 @@ def __init__(self, args, outpath): self.parameters = None self.num_params = None self.optimizer = None + self.netdir = None def build_input(self): # build a noise tensor From 6032616197198bf4eceb41bdfcf05132f94e4836 Mon Sep 17 00:00:00 2001 From: Paul Goyes Date: Fri, 6 Oct 2023 13:31:23 -0500 Subject: [PATCH 2/2] Update metrics.py Update np.float to float, --- utils/metrics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/metrics.py b/utils/metrics.py index eec1460..a9b43a3 100644 --- a/utils/metrics.py +++ b/utils/metrics.py @@ -5,7 +5,7 @@ def snr(output: np.ndarray or torch.Tensor, target: np.ndarray or torch.Tensor - ) -> np.float or torch.Tensor: + ) -> float or torch.Tensor: """Compute the Signal-to-Noise Ratio in dB""" if target.shape != output.shape: @@ -19,7 +19,7 @@ def snr(output: np.ndarray or torch.Tensor, def pcorr(output: np.ndarray or torch.Tensor, target: np.ndarray or torch.Tensor - ) -> np.float or torch.Tensor: + ) -> float or torch.Tensor: """ Compute the Pearson Correlation Coefficient https://en.wikipedia.org/wiki/Pearson_correlation_coefficient