pengqianhan / STF-Spatial-Temporal-Fusion-for-Trajectory-Prediction

MIT License
6 stars 1 forks source link

runtimeerror #1

Open lee1221 opened 4 months ago

lee1221 commented 4 months ago

when I run main.py to test model: RuntimeError: cannot reshape tensor of 0 elements into shape [-1, 120, 0, 2] because the unspecified dimension size -1 can be any value and is ambiguous.

屏幕截图 2024-02-26 102808 How to resolve this bug? I appreciate any help/suggestions!

pengqianhan commented 4 months ago

Thank you for your question. I suggest running data_process.py to create a new dataset before executing main.py.

lee1221 commented 4 months ago

thanks for your reply. But I run data_process.py to create train_data.pkl and test_data.pkl, then when I run main.py to test model, this bug occured again. Do you know how to resolve it?

RuntimeError: cannot reshape tensor of 0 elements into shape [-1, 120, 0, 2] because the unspecified dimension size -1 can be any value and is ambiguous.

chengqb0126 commented 1 month ago

thanks for your reply. 谢谢你的回复。 But I run data_process.py to create train_data.pkl and test_data.pkl, then when I run main.py to test model, this bug occured again. Do you know how to resolve it? 但是我运行data_process.py来创建train_data.pkl和test_data.pkl,然后当我运行main.py来测试模型时,这个错误又出现了。你知道怎么解决吗?

RuntimeError: cannot reshape tensor of 0 elements into shape [-1, 120, 0, 2] because the unspecified dimension size -1 can be any value and is ambiguous.运行时错误:无法将0个元素的张量重新整形为[-1,120,0,2]形状,因为未指定的维度大小-1可以是任何值,并且是不明确的。

Hi,brother!I have the same problem,do you solve the problem?If you solve,can you help me?Thank you very much! image