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
ModelZoo
ResNet50_tensorflow
Commits
bda18166
Commit
bda18166
authored
Jul 29, 2020
by
André Susano Pinto
Committed by
A. Unique TensorFlower
Jul 29, 2020
Browse files
Create output directories when converting bert checkpoint.
PiperOrigin-RevId: 323827690
parent
855d29db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
official/nlp/bert/tf2_encoder_checkpoint_converter.py
official/nlp/bert/tf2_encoder_checkpoint_converter.py
+1
-0
No files found.
official/nlp/bert/tf2_encoder_checkpoint_converter.py
View file @
bda18166
...
@@ -73,6 +73,7 @@ def _create_bert_model(cfg):
...
@@ -73,6 +73,7 @@ def _create_bert_model(cfg):
def
convert_checkpoint
(
bert_config
,
output_path
,
v1_checkpoint
):
def
convert_checkpoint
(
bert_config
,
output_path
,
v1_checkpoint
):
"""Converts a V1 checkpoint into an OO V2 checkpoint."""
"""Converts a V1 checkpoint into an OO V2 checkpoint."""
output_dir
,
_
=
os
.
path
.
split
(
output_path
)
output_dir
,
_
=
os
.
path
.
split
(
output_path
)
tf
.
io
.
gfile
.
makedirs
(
output_dir
)
# Create a temporary V1 name-converted checkpoint in the output directory.
# Create a temporary V1 name-converted checkpoint in the output directory.
temporary_checkpoint_dir
=
os
.
path
.
join
(
output_dir
,
"temp_v1"
)
temporary_checkpoint_dir
=
os
.
path
.
join
(
output_dir
,
"temp_v1"
)
...
...
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