From 87988483a62129c3008c98a034244f1fbd93aba2 Mon Sep 17 00:00:00 2001 From: wuhaixu2016 Date: Fri, 25 Nov 2022 21:10:30 +0800 Subject: [PATCH] Update Embed.py --- layers/Embed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layers/Embed.py b/layers/Embed.py index 958eb6e..6f6e7d2 100644 --- a/layers/Embed.py +++ b/layers/Embed.py @@ -28,7 +28,7 @@ def forward(self, x): class TokenEmbedding(nn.Module): def __init__(self, c_in, d_model): super(TokenEmbedding, self).__init__() - padding = 1 if torch.__version__ >= '1.5.0' else 2 + padding = 1 if compared_version(torch.__version__, '1.5.0') else 2 self.tokenConv = nn.Conv1d(in_channels=c_in, out_channels=d_model, kernel_size=3, padding=padding, padding_mode='circular', bias=False) for m in self.modules():