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
eabff6f0
Commit
eabff6f0
authored
Oct 16, 2019
by
Hongkun Yu
Committed by
A. Unique TensorFlower
Oct 16, 2019
Browse files
Makes do_lower_case not trainable.
PiperOrigin-RevId: 275192365
parent
9317f3b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
official/nlp/bert/export_tfhub.py
official/nlp/bert/export_tfhub.py
+2
-1
No files found.
official/nlp/bert/export_tfhub.py
View file @
eabff6f0
...
@@ -70,7 +70,8 @@ def export_bert_tfhub(bert_config: bert_modeling.BertConfig,
...
@@ -70,7 +70,8 @@ def export_bert_tfhub(bert_config: bert_modeling.BertConfig,
checkpoint
=
tf
.
train
.
Checkpoint
(
model
=
core_model
)
checkpoint
=
tf
.
train
.
Checkpoint
(
model
=
core_model
)
checkpoint
.
restore
(
model_checkpoint_path
).
assert_consumed
()
checkpoint
.
restore
(
model_checkpoint_path
).
assert_consumed
()
core_model
.
vocab_file
=
tf
.
saved_model
.
Asset
(
vocab_file
)
core_model
.
vocab_file
=
tf
.
saved_model
.
Asset
(
vocab_file
)
core_model
.
do_lower_case
=
tf
.
Variable
(
"uncased"
in
vocab_file
)
core_model
.
do_lower_case
=
tf
.
Variable
(
"uncased"
in
vocab_file
,
trainable
=
False
)
core_model
.
save
(
hub_destination
,
include_optimizer
=
False
,
save_format
=
"tf"
)
core_model
.
save
(
hub_destination
,
include_optimizer
=
False
,
save_format
=
"tf"
)
...
...
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