Skip to content

Commit

Permalink
Merge pull request opencv#18395 from tomoaki0705:fixNativePow
Browse files Browse the repository at this point in the history
  • Loading branch information
alalek committed Sep 23, 2020
2 parents 9cfe981 + 74c8ccb commit 220b371
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/dnn/src/opencl/ocl4dnn_lrn.cl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ __kernel void TEMPLATE(lrn_full_no_scale,Dtype)(const int nthreads, __global con
* in_off[(head - size) * step];
}
scale_val = k + accum_scale * alpha_over_size;
out_off[(head - post_pad) * step] = in_off[(head - post_pad) * step] * (Dtype)native_powr((Dtype)scale_val, (Dtype)negative_beta);
out_off[(head - post_pad) * step] = in_off[(head - post_pad) * step] * (Dtype)native_powr(scale_val, negative_beta);
++head;
}
// subtract only
Expand All @@ -93,7 +93,7 @@ __kernel void TEMPLATE(lrn_full_no_scale,Dtype)(const int nthreads, __global con
* in_off[(head - size) * step];
}
scale_val = k + accum_scale * alpha_over_size;
out_off[(head - post_pad) * step] = in_off[(head - post_pad) * step] * (Dtype)native_powr((Dtype)scale_val, (Dtype)negative_beta);
out_off[(head - post_pad) * step] = in_off[(head - post_pad) * step] * (Dtype)native_powr(scale_val, negative_beta);
++head;
}
}
Expand Down

0 comments on commit 220b371

Please sign in to comment.