Return torch._C._nn.binary_cross_entropy(input, target, weight, size_average, reduce) RuntimeError: reduce failed to synchronize: device-side assert triggered

everytime i want to run my program i give this error.
i have use sigmoid with output of BCELOSS, i also try logitloss at the place of bce. i also tried assert input method but didnt work for me

Hi,

This error is because some function failed on the GPU.
To know which function was problematic, you can use CUDA_LAUNCH_BLOCKING=1.
This error almost always is caused by a label out of range given to your loss function. Make sure that all your labels are correct and passed properly to the loss function.

thank you man… Have fixed this issue. Now the problem is my model is taking too much time for batch loading, for one epoch it takes 7 hours. how i can improve training efficiency?

Hi,how do you solve this problem!Can you help me?I have the same problem recently!Thanks!