fix the scaler

This commit is contained in:
Kashif Rasul
2021-06-11 12:51:44 +02:00
parent 1a0872d110
commit 729c4a1b57
2 changed files with 4 additions and 4 deletions
@@ -177,8 +177,8 @@ class CausalDeepARNetwork(nn.Module):
# scale is computed on the context length last units of the past target
# scale shape is (batch_size, 1, *target_shape)
_, scale = self.scaler(
past_target[:, self.context_length :, ...],
past_observed_values[:, self.context_length :, ...],
past_target[:, -self.context_length :, ...],
past_observed_values[:, -self.context_length :, ...],
)
_, control_scale = self.control_scaler(
+2 -2
View File
@@ -160,8 +160,8 @@ class DeepARNetwork(nn.Module):
# scale is computed on the context length last units of the past target
# scale shape is (batch_size, 1, *target_shape)
_, scale = self.scaler(
past_target[:, self.context_length :, ...],
past_observed_values[:, self.context_length :, ...],
past_target[:, -self.context_length :, ...],
past_observed_values[:, -self.context_length :, ...],
)
# (batch_size, num_features)