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

Decoder output == nan #14

Open
rui-love opened this issue Dec 27, 2023 · 10 comments
Open

Decoder output == nan #14

rui-love opened this issue Dec 27, 2023 · 10 comments

Comments

@rui-love
Copy link

When I use my dataset to train the model, the decoder output all are nan. The only thing I do is changing the data and road net. And I get the results from the 100 example trajectories.

@chenyuqi990215
Copy link
Owner

can you provide more details, so that I can help you? Do the parameters contain nan after the gradient descend? or Do the inputs contain nan? or Do the log operations cause nan?

@rui-love
Copy link
Author

Thank you very much. The parameters don't contain any nan value. The input are all 0. When I use the torch.autograd.set_detect_anomaly(True)
image
May be the log operations cause nan? How can I deal with it?

@rui-love
Copy link
Author

rui-love commented Dec 27, 2023 via email

@rui-love
Copy link
Author

hello! do you need more information to deal with this problem?

@chenyuqi990215
Copy link
Owner

Maybe you can set 'search_dist' and 'neighbor_dist' in multi_main.py to a large enough values which is larger than the maximum GPS error of your dataset.

@rui-love
Copy link
Author

There is the same situation, is there any other parameters should be care about?

@maxwang967
Copy link

it happens when i'm using a alternative dataset, while it's ok on other baseline models.

@maxwang967
Copy link

There is the same situation, is there any other parameters should be care about?

The issue can be sovled by add a small constant (e.g., 1e-6) to 'x_exp_sum' in both mask_log_softmax funciton and mask_graph_log_softmax function.

@maxwang967
Copy link

There is the same situation, is there any other parameters should be care about?

The issue can be sovled by add a small constant (e.g., 1e-6) to 'x_exp_sum' in both mask_log_softmax funciton and mask_graph_log_softmax function.

@chenyuqi990215 Please consider modify the source code to make it more robust, thank you!

@chenyuqi990215
Copy link
Owner

Thank you for your advice.

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

3 participants