mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 05:29:54 +08:00
Merge pull request #17540 from YashasSamaga:cuda4dnn-update-mish
This commit is contained in:
commit
c244b456f0
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user