Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
c65863ce
Unverified
Commit
c65863ce
authored
Oct 17, 2020
by
Raza Habib
Committed by
GitHub
Oct 17, 2020
Browse files
Remove duplicated mish activation function (#7856)
* Remove duplicated mish activation function * Update activations.py
parent
f5c45a19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
4 deletions
+0
-4
src/transformers/activations.py
src/transformers/activations.py
+0
-4
No files found.
src/transformers/activations.py
View file @
c65863ce
...
@@ -66,7 +66,3 @@ def get_activation(activation_string):
...
@@ -66,7 +66,3 @@ def get_activation(activation_string):
return
ACT2FN
[
activation_string
]
return
ACT2FN
[
activation_string
]
else
:
else
:
raise
KeyError
(
"function {} not found in ACT2FN mapping {}"
.
format
(
activation_string
,
list
(
ACT2FN
.
keys
())))
raise
KeyError
(
"function {} not found in ACT2FN mapping {}"
.
format
(
activation_string
,
list
(
ACT2FN
.
keys
())))
def
mish
(
x
):
return
x
*
torch
.
tanh
(
torch
.
nn
.
functional
.
softplus
(
x
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment