time feature is bigger since we need it when sampling

This commit is contained in:
Dr. Kashif Rasul
2020-02-03 16:05:46 +01:00
parent ccc1efbabd
commit f0b4fc988d
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -239,7 +239,7 @@ class DeepVARTrainingNetwork(nn.Module):
if future_time_feat is None or future_target_cdf is None:
time_feat = past_time_feat[
:, self.history_length - self.context_length :, ...
:,- self.context_length :, ...
]
sequence = past_target_cdf
sequence_length = self.history_length
@@ -247,7 +247,7 @@ class DeepVARTrainingNetwork(nn.Module):
else:
time_feat = torch.cat(
(
past_time_feat[:, self.history_length - self.context_length :, ...],
past_time_feat[:,- self.context_length :, ...],
future_time_feat,
),
dim=1,
@@ -199,7 +199,7 @@ class TransformerTempFlowTrainingNetwork(nn.Module):
if future_time_feat is None or future_target_cdf is None:
time_feat = past_time_feat[
:, self.history_length - self.context_length :, ...
:, - self.context_length :, ...
]
sequence = past_target_cdf
sequence_length = self.history_length
@@ -207,7 +207,7 @@ class TransformerTempFlowTrainingNetwork(nn.Module):
else:
time_feat = torch.cat(
(
past_time_feat[:, self.history_length - self.context_length :, ...],
past_time_feat[:, - self.context_length :, ...],
future_time_feat,
),
dim=1,