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
7e6102ce
Unverified
Commit
7e6102ce
authored
Aug 07, 2019
by
Thomas Wolf
Committed by
GitHub
Aug 07, 2019
Browse files
Merge pull request #963 from guotong1988/patch-2
Update modeling_bert.py
parents
3773ba44
d7fd1056
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
pytorch_transformers/modeling_bert.py
pytorch_transformers/modeling_bert.py
+1
-1
No files found.
pytorch_transformers/modeling_bert.py
View file @
7e6102ce
...
@@ -222,7 +222,7 @@ class BertConfig(PretrainedConfig):
...
@@ -222,7 +222,7 @@ class BertConfig(PretrainedConfig):
try
:
try
:
from
apex.normalization.fused_layer_norm
import
FusedLayerNorm
as
BertLayerNorm
from
apex.normalization.fused_layer_norm
import
FusedLayerNorm
as
BertLayerNorm
except
ImportError
:
except
(
ImportError
,
AttributeError
)
as
e
:
logger
.
info
(
"Better speed can be achieved with apex installed from https://www.github.com/nvidia/apex ."
)
logger
.
info
(
"Better speed can be achieved with apex installed from https://www.github.com/nvidia/apex ."
)
class
BertLayerNorm
(
nn
.
Module
):
class
BertLayerNorm
(
nn
.
Module
):
def
__init__
(
self
,
hidden_size
,
eps
=
1e-12
):
def
__init__
(
self
,
hidden_size
,
eps
=
1e-12
):
...
...
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