aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/python
diff options
context:
space:
mode:
authorGravatar Andrew Selle <aselle@google.com>2018-08-20 16:29:00 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-08-20 16:32:31 -0700
commit631e86bf2d07ee6a530f552c8e7a484e1a28a0e1 (patch)
treee8e2c88270265c9e3d7b130e4cdd868201d5eb47 /tensorflow/contrib/lite/python
parentfc4504edb1ab419ae59b0ebb9ff8d943beb61117 (diff)
Enable TOCO and TFLite In Windows.
- Include in pip build command - Fix use of subprocess to not use unsupported flag on windows. - Fix __init__ in contrib to include tflite PiperOrigin-RevId: 209505929
Diffstat (limited to 'tensorflow/contrib/lite/python')
-rw-r--r--tensorflow/contrib/lite/python/convert.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tensorflow/contrib/lite/python/convert.py b/tensorflow/contrib/lite/python/convert.py
index 7378fcfe10..12cc66dc55 100644
--- a/tensorflow/contrib/lite/python/convert.py
+++ b/tensorflow/contrib/lite/python/convert.py
@@ -19,6 +19,7 @@ from __future__ import division
from __future__ import print_function
import os as _os
+import platform as _platform
import subprocess as _subprocess
import tempfile as _tempfile
@@ -91,12 +92,13 @@ def toco_convert_protos(model_flags_str, toco_flags_str, input_data_str):
fp_output.name
]
cmdline = " ".join(cmd)
+ is_windows = _platform.system() == "Windows"
proc = _subprocess.Popen(
cmdline,
shell=True,
stdout=_subprocess.PIPE,
stderr=_subprocess.STDOUT,
- close_fds=True)
+ close_fds=not is_windows)
stdout, stderr = proc.communicate()
exitcode = proc.returncode
if exitcode == 0: