# Autoformer时间序列论文复现 **Repository Path**: chen-baian/time-series-forecasting ## Basic Information - **Project Name**: Autoformer时间序列论文复现 - **Description**: 论文复现之autoformer(pytorch-->paddlepaddle) - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2023-12-16 - **Last Updated**: 2023-12-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 时间序列预测————论文复现之autoformer #### 介绍 **pytorch——>paddlepaddle** - 论文链接:[https://arxiv.org/abs/2106.13008](http://) - 论文源码:[https://github.com/thuml/Autoformer](http://) - 参考博客:[https://blog.csdn.net/weixin_45193103/article/details/124092615](http://) - 官方文档1:[https://www.paddlepaddle.org.cn/documentation/docs/zh/guides/model_convert/pytorch_api_mapping_cn.html](http://) - 官方文档2:[https://aistudio.baidu.com/aistudio/projectdetail/4843665?forkThirdPart=1](http://) ![输入图片说明](img/autoformer.jpg) #### 终端运行 1. pytorch:`python -u run.py --is_training 1 --root_path ./dataset/ETT-small --data_path ETTh1.csv --model_id load_96_96 --model Autoformer --data custom --features S --seq_len 96 --label_len 48 --pred_len 96 --d_model 128 --n_heads 8 --d_ff 512 --freq h --train_epochs 20 --e_layers 2 --d_layers 1 --factor 1 --enc_in 1 --dec_in 1 --c_out 1 --des 'Exp' --itr 1` 2. paddlepaddle:`python -u run.py --is_training 1 --root_path ./dataset/ETT-small --data_path ETTh1.csv --model_id load_96_96 --model Autoformer --data custom --features S --seq_len 96 --label_len 48 --pred_len 96 --d_model 128 --n_heads 8 --d_ff 512 --freq h --train_epochs 20 --e_layers 2 --d_layers 1 --factor 1 --enc_in 1 --dec_in 1 --c_out 1 --des 'Exp' --itr 1` #### 精度对齐(误差mse——>0.07, mae——>0.07) - #### _pytorch_ ![输入图片说明](img/pytorch.jpg) - #### _paddlepaddle_ ![输入图片说明](img/paddlepaddle.jpg) ``` #### 目录 autoformer之pytorch/autoformer之paddle ├── checkpoints │ └── load_96_96_Autoformer_custom_ftS_sl96_ll48_pl96_dm128_nh8_el2_dl1_df512_fc1_ebtimeF_dtTrue_'Exp'_0 │ └── checkpoint.pth ├── data_provider │ ├── data_factory.py │ ├── data_loader.py │ ├── __init__.py ├── dataset │ ├── electricity │ │ └── electricity.csv │ ├── ETT-small │ │ ├── ETTh1.csv │ │ ├── ETTh2.csv │ │ ├── etth.csv │ │ ├── ETTm1.csv │ │ └── ETTm2.csv │ ├── exchange_rate │ │ └── exchange_rate.csv │ ├── illness │ │ └── national_illness.csv │ ├── traffic │ │ └── traffic.csv │ └── weather │ └── weather.csv ├── exp │ ├── exp_basic.py │ ├── exp_main.py │ ├── __init__.py ├── layers │ ├── AutoCorrelation.py │ ├── Autoformer_EncDec.py │ ├── Embed.py │ ├── __init__.py │ ├── SelfAttention_Family.py │ └── Transformer_EncDec.py ├── models │ ├── Autoformer.py │ ├── Informer.py │ ├── __init__.py │ ├── Reformer.py │ └── Transformer.py ├── pic │ ├── Auto-Correlation.png │ ├── Autoformer.png │ └── results.png ├── results │ └── load_96_96_Autoformer_custom_ftS_sl96_ll48_pl96_dm128_nh8_el2_dl1_df512_fc1_ebtimeF_dtTrue_'Exp'_0 │ ├── metrics.npy │ ├── pred.npy │ └── true.npy ├── run.py ├── scripts │ ├── ECL_script │ │ ├── Autoformer.sh │ │ ├── Informer.sh │ │ ├── Reformer.sh │ │ └── Transformer.sh │ ├── ETT_script │ │ ├── Autoformer_ETTh1.sh │ │ ├── Autoformer_ETTh2.sh │ │ ├── Autoformer_ETTm1.sh │ │ ├── Autoformer_ETTm2.sh │ │ ├── Autoformer_univariate.sh │ │ ├── Informer.sh │ │ ├── Reformer.sh │ │ └── Transformer.sh │ ├── Exchange_script │ │ ├── Autoformer.sh │ │ ├── Autoformer_univariate.sh │ │ ├── Informer.sh │ │ ├── Reformer.sh │ │ └── Transformer.sh │ ├── ILI_script │ │ ├── Autoformer.sh │ │ ├── Informer.sh │ │ ├── Reformer.sh │ │ └── Transformer.sh │ ├── Traffic_script │ │ ├── Autoformer.sh │ │ ├── Informer.sh │ │ ├── Reformer.sh │ │ └── Transformer.sh │ └── Weather_script │ ├── Autoformer.sh │ ├── Informer.sh │ ├── Reformer.sh │ └── Transformer.sh ├── test_results │ └── load_96_96_Autoformer_custom_ftS_sl96_ll48_pl96_dm128_nh8_el2_dl1_df512_fc1_ebtimeF_dtTrue_'Exp'_0 │ ├── 0.pdf │ ├── 100.pdf │ ├── 20.pdf │ ├── 40.pdf │ ├── 60.pdf │ └── 80.pdf └── utils ├── download_data.py ├── __init__.py ├── masking.py ├── metrics.py ├── timefeatures.py └── tools.py ```