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
aaedfc35
Commit
aaedfc35
authored
Aug 10, 2019
by
thomwolf
Browse files
Merge branch 'master' of
https://github.com/huggingface/pytorch-transformers
parents
c683c3d5
70607664
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
pytorch_transformers/modeling_bert.py
pytorch_transformers/modeling_bert.py
+1
-1
pytorch_transformers/modeling_gpt2.py
pytorch_transformers/modeling_gpt2.py
+1
-1
No files found.
pytorch_transformers/modeling_bert.py
View file @
aaedfc35
...
@@ -74,7 +74,7 @@ def load_tf_weights_in_bert(model, config, tf_checkpoint_path):
...
@@ -74,7 +74,7 @@ def load_tf_weights_in_bert(model, config, tf_checkpoint_path):
import
numpy
as
np
import
numpy
as
np
import
tensorflow
as
tf
import
tensorflow
as
tf
except
ImportError
:
except
ImportError
:
logger
.
error
(
"Loading a TensorFlow model
s
in PyTorch, requires TensorFlow to be installed. Please see "
logger
.
error
(
"Loading a TensorFlow model in PyTorch, requires TensorFlow to be installed. Please see "
"https://www.tensorflow.org/install/ for installation instructions."
)
"https://www.tensorflow.org/install/ for installation instructions."
)
raise
raise
tf_path
=
os
.
path
.
abspath
(
tf_checkpoint_path
)
tf_path
=
os
.
path
.
abspath
(
tf_checkpoint_path
)
...
...
pytorch_transformers/modeling_gpt2.py
View file @
aaedfc35
...
@@ -50,7 +50,7 @@ def load_tf_weights_in_gpt2(model, config, gpt2_checkpoint_path):
...
@@ -50,7 +50,7 @@ def load_tf_weights_in_gpt2(model, config, gpt2_checkpoint_path):
import
numpy
as
np
import
numpy
as
np
import
tensorflow
as
tf
import
tensorflow
as
tf
except
ImportError
:
except
ImportError
:
logger
.
error
(
"Loading a TensorFlow model
s
in PyTorch, requires TensorFlow to be installed. Please see "
logger
.
error
(
"Loading a TensorFlow model in PyTorch, requires TensorFlow to be installed. Please see "
"https://www.tensorflow.org/install/ for installation instructions."
)
"https://www.tensorflow.org/install/ for installation instructions."
)
raise
raise
tf_path
=
os
.
path
.
abspath
(
gpt2_checkpoint_path
)
tf_path
=
os
.
path
.
abspath
(
gpt2_checkpoint_path
)
...
...
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