Commit 62466ee0 authored by Hongkun Yu's avatar Hongkun Yu Committed by A. Unique TensorFlower
Browse files

Internal change

PiperOrigin-RevId: 384957416
parent 9caaba0c
...@@ -82,7 +82,7 @@ def export(export_module: ExportModule, ...@@ -82,7 +82,7 @@ def export(export_module: ExportModule,
The savedmodel directory path. The savedmodel directory path.
""" """
ckpt_dir_or_file = checkpoint_path ckpt_dir_or_file = checkpoint_path
if tf.io.gfile.isdir(ckpt_dir_or_file): if ckpt_dir_or_file is not None and tf.io.gfile.isdir(ckpt_dir_or_file):
ckpt_dir_or_file = tf.train.latest_checkpoint(ckpt_dir_or_file) ckpt_dir_or_file = tf.train.latest_checkpoint(ckpt_dir_or_file)
if ckpt_dir_or_file: if ckpt_dir_or_file:
checkpoint = tf.train.Checkpoint(model=export_module.model) checkpoint = tf.train.Checkpoint(model=export_module.model)
......
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