Skip to content

Commit f5184e5

Browse files
Internal change
PiperOrigin-RevId: 320559100
1 parent 0acca91 commit f5184e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

official/nlp/bert/export_tfhub.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def export_bert_tfhub(bert_config: configs.BertConfig,
7979
do_lower_case, vocab_file)
8080
core_model, encoder = create_bert_model(bert_config)
8181
checkpoint = tf.train.Checkpoint(model=encoder)
82-
checkpoint.restore(model_checkpoint_path).assert_consumed()
82+
checkpoint.restore(model_checkpoint_path).assert_existing_objects_matched()
8383
core_model.vocab_file = tf.saved_model.Asset(vocab_file)
8484
core_model.do_lower_case = tf.Variable(do_lower_case, trainable=False)
8585
core_model.save(hub_destination, include_optimizer=False, save_format="tf")

0 commit comments

Comments
 (0)