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
b45e65ef
Unverified
Commit
b45e65ef
authored
Jun 30, 2020
by
Sam Shleifer
Committed by
GitHub
Jun 30, 2020
Browse files
Avoid deprecation warning for F.tanh (#5413)
parent
23231c0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/modeling_mobilebert.py
src/transformers/modeling_mobilebert.py
+1
-1
No files found.
src/transformers/modeling_mobilebert.py
View file @
b45e65ef
...
...
@@ -575,7 +575,7 @@ class MobileBertPooler(nn.Module):
return
first_token_tensor
else
:
pooled_output
=
self
.
dense
(
first_token_tensor
)
pooled_output
=
F
.
tanh
(
pooled_output
)
pooled_output
=
torch
.
tanh
(
pooled_output
)
return
pooled_output
...
...
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