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

Label and cross entropy ERROR #8

Open
2000LuoLuo opened this issue Sep 20, 2024 · 0 comments
Open

Label and cross entropy ERROR #8

2000LuoLuo opened this issue Sep 20, 2024 · 0 comments

Comments

@2000LuoLuo
Copy link

This is my problem, please help me.
How can I solve it?

C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\cuda\Loss.cu:106: block: [107,0,0], thread: [117,0,0] Assertion target_val >= zero && target_val <= one failed.
C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\cuda\Loss.cu:106: block: [107,0,0], thread: [118,0,0] Assertion target_val >= zero && target_val <= one failed.
C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\cuda\Loss.cu:106: block: [107,0,0], thread: [119,0,0] Assertion target_val >= zero && target_val <= one failed.
C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\cuda\Loss.cu:106: block: [6,0,0], thread: [12,0,0] Assertion target_val >= zero && target_val <= one failed.
C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\cuda\Loss.cu:106: block: [79,0,0], thread: [5,0,0] Assertion target_val >= zero && target_val <= one failed.
Traceback (most recent call last):
File "C:\Users\LHT\Desktop\RCF_Pytorch_Updated-master\train_RCF.py", line 353, in
main()
File "C:\Users\LHT\Desktop\RCF_Pytorch_Updated-master\train_RCF.py", line 221, in main
tr_avg_loss, tr_detail_loss = train(
File "C:\Users\LHT\Desktop\RCF_Pytorch_Updated-master\train_RCF.py", line 257, in train
loss = loss + cross_entropy_loss_RCF(o, label)
File "C:\Users\LHT\Desktop\RCF_Pytorch_Updated-master\functions.py", line 11, in cross_entropy_loss_RCF
mask[mask == 1] = 1.0 * num_negative / (num_positive + num_negative)
RuntimeError: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

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

1 participant