"vscode:/vscode.git/clone" did not exist on "d65a0f3e5422e2cd63572c6c6cd6a0f77b567d20"
Unverified Commit 745a06a9 authored by Hongkun Yu's avatar Hongkun Yu Committed by GitHub
Browse files

Merged commit includes the following changes: (#7307)

260052674  by hongkuny<hongkuny@google.com>:

    Add expect_partial()

--

PiperOrigin-RevId: 260052674
parent b59420dd
...@@ -144,7 +144,7 @@ def predict_squad_customized(strategy, input_meta_data, bert_config, ...@@ -144,7 +144,7 @@ def predict_squad_customized(strategy, input_meta_data, bert_config,
checkpoint_path = tf.train.latest_checkpoint(FLAGS.model_dir) checkpoint_path = tf.train.latest_checkpoint(FLAGS.model_dir)
logging.info('Restoring checkpoints from %s', checkpoint_path) logging.info('Restoring checkpoints from %s', checkpoint_path)
checkpoint = tf.train.Checkpoint(model=squad_model) checkpoint = tf.train.Checkpoint(model=squad_model)
checkpoint.restore(checkpoint_path) checkpoint.restore(checkpoint_path).expect_partial()
@tf.function @tf.function
def predict_step(iterator): def predict_step(iterator):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment