Skip to content

Commit bab4bc0

Browse files
committed
Merge pull request opencv#9284 from ipuustin:dnn-opencl-fixes
2 parents f6c4901 + c2de5cf commit bab4bc0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/dnn/src/opencl/activations.cl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ __kernel void TanHForward(const int count, __global T* in, __global T* out) {
2121
__kernel void SigmoidForward(const int count, __global const T* in, __global T* out) {
2222
int index = get_global_id(0);
2323
if(index < count)
24-
out[index] = 1. / (1. + exp(-in[index]));
24+
out[index] = 1.0f / (1.0f + exp(-in[index]));
2525
}
2626

2727
__kernel void BNLLForward(const int n, __global const T* in, __global T* out) {
2828
int index = get_global_id(0);
2929
if (index < n) {
30-
out[index] = in[index] > 0 ? in[index] + log(1. + exp(-in[index])) : log(1. + exp(in[index]));
30+
out[index] = in[index] > 0 ? in[index] + log(1.0f + exp(-in[index])) : log(1.0f + exp(in[index]));
3131
}
3232
}
3333

@@ -41,4 +41,4 @@ __kernel void PowForward(const int n, __global const T* in, __global T* out, con
4141
int index = get_global_id(0);
4242
if (index < n)
4343
out[index] = pow(shift + scale * in[index], power);
44-
}
44+
}

0 commit comments

Comments
 (0)