Implementation of activations as pytorch modules (#15616)

* Implement activations as pytorch modules

* Apply fixup

* Add missing tests for activations

* Update docstring

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
This commit is contained in:
Eldar Kurtic
2022-02-16 20:37:52 +01:00
committed by GitHub
parent 66828a19b1
commit f65fe3663a
2 changed files with 108 additions and 47 deletions

View File

@@ -40,6 +40,10 @@ class TestActivations(unittest.TestCase):
get_activation("gelu_new")
get_activation("gelu_fast")
get_activation("gelu_python")
get_activation("quick_gelu")
get_activation("mish")
get_activation("linear")
get_activation("sigmoid")
with self.assertRaises(KeyError):
get_activation("bogus")
with self.assertRaises(KeyError):