Temporal Fusion Transformer from PyTorch-Forecasting with Multiple Targets - 'list' error
New to PyTorch and the PyTorch Forecasting library and trying to predict multiple targets using the Temporal Fusion Transformer model. I have 7 targets in a list as my targets variable. I'm using MultiLoss as my loss function with a list of 7 CrossEntropy loss functions (1 per target variable) -- In the problem I'm trying to model, there are 7 possible outcomes per time step and I'm trying to find which option is most likely. I'm looking for a % for each prediction and want to choose the most likely (highest % of the 7 possible targets for each time step). I'm getting an error during this step:
trainer.fit(
tft,
train_dataloaders=train_dataloader,
val_dataloaders=val_dataloader,
)
Temporal Fusion Transformers are listed as one of the models within the PyTorch Forecasting library that allow for multiple targets. Is there any way I can modify the model to allow for my multiple targets and correct this error? Thanks. Here's the error I get: Error
Topic transformer forecasting pytorch lstm time-series
Category Data Science