"tests/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "eb7ef26736055055df252d8f06d665fd407f6fe7"
Commit d766f5e8 authored by Manjunath Bhat's avatar Manjunath Bhat Committed by Davis E. King
Browse files

Adding Mish activation function (#1938)



* Adding Mish activation function

* Bug fixed

* Added test for Mish

* Removed unwanted comments

* Simplified calculation and removed comments

* Kernel added and gradient computation simplified

* Gradient simplified

* Corrected gradient calculations

* Compute output when input greater than 8

* Minor correction

* Remove unnecessary pgrad for Mish

* Removed CUDNN calls

* Add standalone CUDA implementation of the Mish activation function

* Fix in-place gradient in the CUDA version; refactor a little

* Swap delta and omega

* Need to have src (=x) (and not dest) available for Mish

* Add test case that makes sure that cuda::mish and cpu::mish return the same results

* Minor tweaking to keep the previous behaviour
Co-authored-by: default avatarJuha Reunanen <juha.reunanen@tomaattinen.com>
parent a82bf153
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