From fc992bc37e36ef444a5191284cef9c3d7acb7cb6 Mon Sep 17 00:00:00 2001 From: framist Date: Tue, 2 Apr 2024 20:07:36 +0800 Subject: [PATCH] Fixed incorrect argument: changed `dims` to `dim` --- ModernTCN-Long-term-forecasting/models/ModernTCN.py | 4 ++-- ModernTCN-classification/models/ModernTCN.py | 4 ++-- ModernTCN-detection/models/ModernTCN.py | 4 ++-- ModernTCN-imputation/models/ModernTCN.py | 4 ++-- ModernTCN-short-term/models/ModernTCN.py | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ModernTCN-Long-term-forecasting/models/ModernTCN.py b/ModernTCN-Long-term-forecasting/models/ModernTCN.py index 16ebf7c..5d32427 100644 --- a/ModernTCN-Long-term-forecasting/models/ModernTCN.py +++ b/ModernTCN-Long-term-forecasting/models/ModernTCN.py @@ -93,8 +93,8 @@ def PaddingTwoEdge1d(self,x,pad_length_left,pad_length_right,pad_values=0): else: pad_left = torch.ones(D_out, D_in, pad_length_left) * pad_values pad_right = torch.ones(D_out, D_in, pad_length_right) * pad_values - x = torch.cat([pad_left,x],dims=-1) - x = torch.cat([x,pad_right],dims=-1) + x = torch.cat([pad_left,x],dim=-1) + x = torch.cat([x,pad_right],dim=-1) return x def get_equivalent_kernel_bias(self): diff --git a/ModernTCN-classification/models/ModernTCN.py b/ModernTCN-classification/models/ModernTCN.py index 99469c8..564b534 100644 --- a/ModernTCN-classification/models/ModernTCN.py +++ b/ModernTCN-classification/models/ModernTCN.py @@ -95,8 +95,8 @@ def PaddingTwoEdge1d(self,x,pad_length_left,pad_length_right,pad_values=0): else: pad_left = torch.ones(D_out, D_in, pad_length_left) * pad_values pad_right = torch.ones(D_out, D_in, pad_length_right) * pad_values - x = torch.cat([pad_left,x],dims=-1) - x = torch.cat([x,pad_right],dims=-1) + x = torch.cat([pad_left,x],dim=-1) + x = torch.cat([x,pad_right],dim=-1) return x def get_equivalent_kernel_bias(self): diff --git a/ModernTCN-detection/models/ModernTCN.py b/ModernTCN-detection/models/ModernTCN.py index 576e7c0..1eecc77 100644 --- a/ModernTCN-detection/models/ModernTCN.py +++ b/ModernTCN-detection/models/ModernTCN.py @@ -97,8 +97,8 @@ def PaddingTwoEdge1d(self,x,pad_length_left,pad_length_right,pad_values=0): else: pad_left = torch.ones(D_out, D_in, pad_length_left) * pad_values pad_right = torch.ones(D_out, D_in, pad_length_right) * pad_values - x = torch.cat([pad_left,x],dims=-1) - x = torch.cat([x,pad_right],dims=-1) + x = torch.cat([pad_left,x],dim=-1) + x = torch.cat([x,pad_right],dim=-1) return x def get_equivalent_kernel_bias(self): diff --git a/ModernTCN-imputation/models/ModernTCN.py b/ModernTCN-imputation/models/ModernTCN.py index cbbec6e..cfbce58 100644 --- a/ModernTCN-imputation/models/ModernTCN.py +++ b/ModernTCN-imputation/models/ModernTCN.py @@ -91,8 +91,8 @@ def PaddingTwoEdge1d(self,x,pad_length_left,pad_length_right,pad_values=0): else: pad_left = torch.ones(D_out, D_in, pad_length_left) * pad_values pad_right = torch.ones(D_out, D_in, pad_length_right) * pad_values - x = torch.cat([pad_left,x],dims=-1) - x = torch.cat([x,pad_right],dims=-1) + x = torch.cat([pad_left,x],dim=-1) + x = torch.cat([x,pad_right],dim=-1) return x def get_equivalent_kernel_bias(self): diff --git a/ModernTCN-short-term/models/ModernTCN.py b/ModernTCN-short-term/models/ModernTCN.py index 7e960c0..7fee2ef 100644 --- a/ModernTCN-short-term/models/ModernTCN.py +++ b/ModernTCN-short-term/models/ModernTCN.py @@ -95,8 +95,8 @@ def PaddingTwoEdge1d(self,x,pad_length_left,pad_length_right,pad_values=0): else: pad_left = torch.ones(D_out, D_in, pad_length_left) * pad_values pad_right = torch.ones(D_out, D_in, pad_length_right) * pad_values - x = torch.cat([pad_left,x],dims=-1) - x = torch.cat([x,pad_right],dims=-1) + x = torch.cat([pad_left,x],dim=-1) + x = torch.cat([x,pad_right],dim=-1) return x def get_equivalent_kernel_bias(self):