mirror of
https://github.com/wassname/pytorch-ts.git
synced 2026-07-17 11:32:26 +08:00
more typos
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
# )
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user