aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/session_bundle/exporter.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/contrib/session_bundle/exporter.py')
-rw-r--r--tensorflow/contrib/session_bundle/exporter.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tensorflow/contrib/session_bundle/exporter.py b/tensorflow/contrib/session_bundle/exporter.py
index dcc7fbaa2d..f6f663aae7 100644
--- a/tensorflow/contrib/session_bundle/exporter.py
+++ b/tensorflow/contrib/session_bundle/exporter.py
@@ -301,7 +301,12 @@ class Exporter(object):
if exports_to_keep:
# create a simple parser that pulls the export_version from the directory.
def parser(path):
- match = re.match("^" + export_dir_base + "/(\\d{8})$", path.path)
+ if os.name == 'nt':
+ match = re.match("^" + export_dir_base.replace('\\','/') + "/(\\d{8})$",
+ path.path.replace('\\','/'))
+ else:
+ match = re.match("^" + export_dir_base + "/(\\d{8})$",
+ path.path)
if not match:
return None
return path._replace(export_version=int(match.group(1)))