more typos

This commit is contained in:
Kashif Rasul
2020-01-27 20:28:38 +01:00
parent 9c22720b60
commit ff92cbad50
7 changed files with 8 additions and 7 deletions
@@ -105,12 +105,13 @@ class TransformerEstimator(PTSEstimator):
return Chain(
[RemoveFields(field_names=remove_field_names)]
+ (
[SetField(output_field=FieldName.FEAT_STATIC_CAT, value=[0.0])]
[SetField(output_field=FieldName.FEAT_STATIC_CAT, value=[0])]
if not self.use_feat_static_cat
else []
)
+ [
AsNumpyArray(field=FieldName.FEAT_STATIC_CAT, expected_ndim=1),
AsNumpyArray(field=FieldName.FEAT_STATIC_CAT,
expected_ndim=1, dtype=np.long),
AsNumpyArray(
field=FieldName.TARGET,
# in the following line, we add 1 for the time dimension
+5 -5
View File
@@ -70,13 +70,13 @@ class TransformerNetwork(nn.Module):
self.embedder = FeatureEmbedder(
cardinalities=cardinality,
embedding_dims=[embedding_dimension for _ in cardinality],
embedding_dims=embedding_dimension,
)
if scaling:
self.scaler = MeanScaler(keepdims=True)
self.scaler = MeanScaler(keepdim=True)
else:
self.scaler = NOPScaler(keepdims=True)
self.scaler = NOPScaler(keepdim=True)
@staticmethod
def get_lagged_subsequences(
@@ -255,10 +255,10 @@ class TransformerTrainingNetwork(TransformerNetwork):
future_target=future_target,
)
enc_input = input[:, :self.context_length, ...] # F.slice_axis(
enc_input = inputs[:, :self.context_length, ...] # F.slice_axis(
# inputs, axis=1, begin=0, end=self.context_length
# )
dec_input = input[:, self.context_length:, ...] # F.slice_axis(
dec_input = inputs[:, self.context_length:, ...] # F.slice_axis(
# inputs, axis=1, begin=self.context_length, end=None
# )