PyTorch implementation of Transformer model used in "Deep Transformer Models for Time Series Forecasting: The Influenza Prevalence Case"
This is the repo for the Towards Data Science article called "How to make a Transformer for time series forecasting with PyTorch".
The article explains step by step how to code the Transformer model used in the paper "Deep Transformer Models for Time Series Forecasting: The Influenza Prevalence Case"
The article uses the Transformer architecture diagram from the paper as the point of departure and shows step by step how to implement the model with PyTorch.
The sandbox.py file shows how to use the Transformer to make a prediction on the data from the .csv file in "/data".