thuml / Autoformer

About Code release for "Autoformer: Decomposition Transformers with Auto-Correlation for Long-Term Series Forecasting" (NeurIPS 2021), https://arxiv.org/abs/2106.13008
MIT License
2k stars 429 forks source link

Can't run when kernal_size is even #84

Closed dasoumao closed 2 years ago

dasoumao commented 2 years ago

https://github.com/thuml/Autoformer/blob/e116bbcf41f537f4ab53d172d9babfc0a026330f/layers/Autoformer_EncDec.py#L31

wuhaixu2016 commented 2 years ago

You need to change the padding protocol to make the series length invariant after the moving average.