mirror of
https://github.com/wassname/pytorch-ts.git
synced 2026-07-16 11:21:03 +08:00
time feature is bigger since we need it when sampling
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user