jqyang22 / HSIC-FM

[TNNLS 2023] Overcoming the Barrier of Incompleteness: A Hyperspectral Image Classification Full Model
16 stars 0 forks source link

CUDA_LAUNCH_BLOCKING=1 #2

Open 21-319 opened 10 months ago

21-319 commented 10 months ago

Hello,my device is also a 3090, but I made a change in the code here (GPU_ID = '0'), I encountered the following error while trying to reproduce your code,: File "./HSIC-FM-main-2023-weishixian-envs\main.py", line 217, in loss_trn, acc_trn, tsne_trn, tsne_trn_y = b.train(i, loss_trn, acc_trn, tsne_trn, tsne_trn_y, net, optimizer, scheduler, trn_loader, criterion) File "e:\hjj\HSIC-FM-main-2023-weishixian-envs\network.py", line 37, in train epochavg_loss += loss.item() 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

I have made many attempts but have been unable to solve this problem. Do you know how to resolve it?

jqyang22 commented 9 months ago

Hi, sorry for the late reply. Perhaps you can check if the number of categories in the dataset and the number of categories in the network output are the same, or if the specified GPU's memory is insufficient.