balajiselvaraj1601 / RCF_Pytorch_Updated

Pytorch implementation of RCF
35 stars 6 forks source link

Label and cross entropy ERROR #8

Open 2000LuoLuo opened 2 months ago

2000LuoLuo commented 2 months ago

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.