yuqinie98 / PatchTST

An offical implementation of PatchTST: "A Time Series is Worth 64 Words: Long-term Forecasting with Transformers." (ICLR 2023) https://arxiv.org/abs/2211.14730
Apache License 2.0
1.51k stars 262 forks source link

outputs和batch_y 序列长度问题 #112

Open JJJTF opened 4 months ago

JJJTF commented 4 months ago

您好,为什么在exp_main.py中的第172和173行中outputs = outputs[:, -self.args.pred_len:, f_dim:]和 batch_y = batch_y[:, -self.args.pred_len:, f_dim:].to(self.device)代码中outputs和batch_y 的长度不一致,最后通过-self.args.pred_len截取相同长度的序列计算损失? 请您解答我在时序预测中的疑问,谢谢!