Unverified Commit eb0414f4 authored by Matthew Dawkins's avatar Matthew Dawkins Committed by GitHub
Browse files

Fix windows compile issues (#510)

parent 5e7f7853
......@@ -59,8 +59,8 @@ __global__ void softmax_focal_loss_backward_cuda2_kernel(
int c = index % num_classes;
int64_t label = target[n];
T flag = (label == c) * (T)1.;
if (label >= 0) {
T flag = (label == c ? (T)1. : (T)0.);
grad_input[index] = buff[n] * (flag - softmax[index]);
} else {
grad_input[index] = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment