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

数据集只有两列,请问是否可以用tsformer预训练模型 #62

Open
emanlee opened this issue Jan 4, 2024 · 4 comments
Open

Comments

@emanlee
Copy link

emanlee commented Jan 4, 2024

作者,您好! 请教一个问题

我的数据集只有两列(时间,数量),请问是否可以用这个预训练模型,谢谢

date(input),number(output)
5/9/2021 6:00,0
5/9/2021 7:00,0
5/9/2021 8:00,16
5/9/2021 9:00,71
5/9/2021 10:00,126
5/9/2021 11:00,156
5/9/2021 12:00,99
5/9/2021 13:00,78
5/9/2021 14:00,65
5/9/2021 15:00,33

@zezhishao
Copy link
Collaborator

你需要重新训练TSFormer。

@emanlee
Copy link
Author

emanlee commented Jan 5, 2024

您好,谢谢您的回复~

我采用自己的数据集跑 pre-train没有错误(python step/run.py --cfg='step/TSFormer_mydata.py' --gpus='0' )。 但是跑训练模型时(python step/run.py --cfg='step/STEP_mydateset.py' --gpus='0') 出现错误。调试过程中,我修改各种参数配置来消除错误,但是消除一个之后,又出现新的错误。
请问是不是和 discrete_graph_learning.py , TSFormer_mydata.py, STEP_mydateset.py 的配置密切相关,是否有关于这几个文件的readme文件,针对其中的配置参数进行说明,谢谢您!

错误1:
File "/home/step_tsformer/step/step_arch/discrete_graph_learning.py", line 108, in get_k_nn_neighbor
top_k, indices = torch.topk(adj, k, dim=-1)
RuntimeError: selected index k out of range

错误2:
/pytorch/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:111: operator(): block: [0,0,0], thread: [0,0,0] Assertion idx_dim >= 0 && idx_dim < index_size && "index out of bounds" failed.

错误3:
File "/home/xuqian/step_tsformer/step/step_arch/discrete_graph_learning.py", line 186, in forward
adj_knn = self.get_k_nn_neighbor(hidden_states.reshape(batch_size, num_nodes, -1), k=1*self.num_nodes, metric="cosine")
File "/home/xuqian/step_tsformer/step/step_arch/discrete_graph_learning.py", line 119, in get_k_nn_neighbor res.scatter_(-1, indices, top_k)
RuntimeError: CUDA error: device-side assert triggered

@zezhishao
Copy link
Collaborator

尽管TSFormer可以适用于单变量,但STEP不适用。STEP是一个时空预测模型,它以GWNet作为backend。

@emanlee
Copy link
Author

emanlee commented Jan 5, 2024

好的,明白了!
再次感谢您的回复!

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