convert export_dir as pathlike object to str in parse_saved_model

This commit is contained in:
Yixing Fu 2020-06-18 19:53:22 -04:00
parent 1363f0f6e8
commit 1c72a6c65e

View File

@ -83,11 +83,11 @@ def parse_saved_model(export_dir):
"""
# Build the path to the SavedModel in pbtxt format.
path_to_pbtxt = os.path.join(
compat.as_bytes(export_dir),
compat.as_bytes(compat.path_to_str(export_dir)),
compat.as_bytes(constants.SAVED_MODEL_FILENAME_PBTXT))
# Build the path to the SavedModel in pb format.
path_to_pb = os.path.join(
compat.as_bytes(export_dir),
compat.as_bytes(compat.path_to_str(export_dir)),
compat.as_bytes(constants.SAVED_MODEL_FILENAME_PB))
# Parse the SavedModel protocol buffer.