From 85cd9bd629f41522894b1c09a327f222dd516659 Mon Sep 17 00:00:00 2001 From: Kashif Rasul Date: Wed, 30 Mar 2022 15:28:06 +0200 Subject: [PATCH] do not project static --- tft/module.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/tft/module.py b/tft/module.py index d7401fe..5fd624d 100644 --- a/tft/module.py +++ b/tft/module.py @@ -312,13 +312,6 @@ class TFTModel(nn.Module): in_features=num_feat_dynamic_real, out_features=variable_dim ) - self.static_proj = nn.Linear( - in_features=sum(self.embedding_dimension) - + self.num_feat_static_real - + input_size, - out_features=variable_dim, - ) - # variable selection networks self.past_selection = VariableSelectionNetwork( d_hidden=variable_dim, @@ -493,9 +486,7 @@ class TFTModel(nn.Module): past_time_feat_proj = time_feat_proj[:, : self.context_length, ...] future_time_feat_proj = time_feat_proj[:, self.context_length :, ...] - static_feat_proj = self.static_proj(static_feat) - - static_var, _ = self.static_selection([static_feat_proj]) + static_var, _ = self.static_selection(static_feat) static_selection = self.selection(static_var).unsqueeze(1) static_enrichment = self.enrichment(static_var).unsqueeze(1)