Skip to content
项目

关于

PyTorch implementation of Transformer model used in "Deep Transformer Models for Time Series Forecasting: The Influenza Prevalence Case"

人工智能与机器学习

这些数字如何统计

实测星标增长

24小时
0
7天
-1
15天
-1
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

How to code a Transformer model for time series forecasting in PyTorch

PyTorch implementation of Transformer model used in "Deep Transformer Models for Time Series Forecasting: The Influenza Prevalence Case"

This is the repo for the two Towards Data Science article called "How to make a Transformer for time series forecasting with PyTorch" and "How to run inference with a PyTorch time series Transformer"

The first 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 second article explains how to use the time series Transformer at inference time where you don't know the decoder input values.

The sandbox.py file shows how to use the Transformer to make a training prediction on the data from the .csv file in "/data".

The inference.py file contains the function that takes care of inference, and the inference_example.py file shows a pseudo-ish code example of how to use the function during model validation and testing.

探索相关项目

加载中…