1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Merge pull request #17540 from YashasSamaga:cuda4dnn-update-mish

This commit is contained in:
Alexander Alekhin
2020-06-14 11:08:53 +00:00
+1 -4
View File
@@ -54,11 +54,8 @@ struct mish_functor<float> {
using csl::device::fast_exp;
auto e = fast_exp(value);
if (value <= -18.0f)
return value * e;
auto n = e * e + 2 * e;
if (value <= -5.0f)
if (value <= -0.6f)
return value * fast_divide(n, n + 2);
return value - 2 * fast_divide(value, n + 2);