src/transformers/models/time_series_transformer/modeling_time_series_transformer.py/TimeSeriesTransformerModel/__init__
class TimeSeriesTransformerModel:    def __init__(self, config: TimeSeriesTransformerConfig):
        super().__init__(config)

        if config.scaling == "mean" or config.scaling:
            self.scaler = TimeSeriesMeanScaler(dim=1, keepdim=True)
        elif config.scaling == "std":
            self.scaler = TimeSeriesStdScaler(dim=1, keepdim=True)
        else:
            self.scaler = TimeSeriesNOPScaler(dim=1, keepdim=True)

        if config.num_static_categorical_features > 0:
            self.embedder = TimeSeriesFeatureEmbedder(
                cardinalities=config.cardinality,
                embedding_dims=config.embedding_dimension,
            )

        # transformer encoder-decoder and mask initializer
        self.encoder = TimeSeriesTransformerEncoder(config)
        self.decoder = TimeSeriesTransformerDecoder(config)

        # Initialize weights and apply final processing
        self.post_init()