I got `Runtime Error: cudaEventSynchronize in future::wait device-side assert triggered ’ when I use binary_cross_entropy
I think this is because the input of the BCELoss must fall into the range of [0,1].
my input is a product of two softmax, so, in theory, the product will never greater than 1.
I think this my be related to floating-point precision ?
and if so, how can I solve this problem.
can anyone help me ? thank you !
here is my code
cls_prob = F.softmax(cls_score, dim=1)
det_prob = F.softmax(det_score, dim=0)
predict = F.mul(cls_prob, det_prob)
loss = F.binary_cross_entropy(predict, label, size_average=False)