When to specify decoder/encoder parameters for pytorch Temporal Fusion Transformer?

138 Views Asked by At

I've started to work with the pytorch Temporal Fusion Transformer. While building up the model I stumbled over the parameters of the encoder/decoder for reals and categoricals. From the source code I couldn't figure out what they are doing and when I should specify them. Can anybody help, please?

I am referring to these parameters in Temporal Fusion Transformer (https://pytorch-forecasting.readthedocs.io/en/stable/api/pytorch_forecasting.models.temporal_fusion_transformer.TemporalFusionTransformer.html):

static_categoricals – names of static categorical variables

static_reals – names of static continuous variables

time_varying_categoricals_encoder – names of categorical variables for encoder

time_varying_categoricals_decoder – names of categorical variables for decoder

time_varying_reals_encoder – names of continuous variables for encoder

time_varying_reals_decoder – names of continuous variables for decoder

source: https://pytorch-forecasting.readthedocs.io/en/stable/_modules/pytorch_forecasting/models/temporal_fusion_transformer.html#TemporalFusionTransformer

Most tft-examples don't specify those parameters at all. I thought the variabels for encoding and decoding are chosen by the model itself. So, in which case should I add those parameters and if I specify them, do they only take the specified variabels into account? Thanks for your help!

0

There are 0 best solutions below