Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

模型的预测结果与损失计算的问题 #10

Open
BellChai opened this issue Jul 9, 2024 · 1 comment
Open

模型的预测结果与损失计算的问题 #10

BellChai opened this issue Jul 9, 2024 · 1 comment

Comments

@BellChai
Copy link

BellChai commented Jul 9, 2024

你好,关于代码我有些问题想请教一下。

执行短期预测时,对于UniST类的forward函数,它的原始值是imgs,预测结果是pred,但是

  1. pred是由imgs计算来的,但是损失函数却计算的是pred和imgs的差异,而不是pred和真正未来值的
  2. 原本应该是历史长度6,预测长度6,但是imgs长度却自始至终都是12,而pred的元素数量和imgs一样,看起来也是12

所以我想问下pred究竟是什么的预测,以及这计算的是什么的损失呢?

@YuanYuan98
Copy link
Collaborator

The shape of both pred and imgs is indeed 12, reflecting the combined length of historical (6) and future (6) data for the 6-to-6 prediction. However, we specifically calculate the loss based on the difference between the predicted future values and the actual future values (i.e., from time step 6 to 12). We achieve this by using a mask to isolate and focus on the future time steps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants