mirror of
https://github.com/wassname/pytorch-ts.git
synced 2026-08-02 13:03:05 +08:00
fix the scaler
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user