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
baa00f65
Unverified
Commit
baa00f65
authored
Oct 20, 2022
by
Chino
Committed by
GitHub
Oct 20, 2022
Browse files
Fix exception thrown using MishActivation (#19739)
* Fix exception thrown using MishActivation * Update activations.py
parent
2dd1b8f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/activations.py
src/transformers/activations.py
+1
-1
No files found.
src/transformers/activations.py
View file @
baa00f65
...
...
@@ -121,7 +121,7 @@ class MishActivation(nn.Module):
def
__init__
(
self
):
super
().
__init__
()
if
version
.
parse
(
version
.
parse
(
torch
.
__version__
)
.
base_version
)
<
version
.
parse
(
"1.9"
):
if
version
.
parse
(
torch
.
__version__
)
<
version
.
parse
(
"1.9
.0
"
):
self
.
act
=
self
.
_mish_python
else
:
self
.
act
=
nn
.
functional
.
mish
...
...
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