aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/python
diff options
context:
space:
mode:
authorGravatar Yu-Cheng Ling <ycling@google.com>2018-09-27 16:19:09 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-09-27 16:33:31 -0700
commit2330933ddd0b29ad206e351c9120e621cdaf6312 (patch)
treec617ed415b787d276619fcd19f32b6aa1e133453 /tensorflow/contrib/lite/python
parent5f67bf69d3f53d1cd3bb86ebeeb03ea2bba5911b (diff)
Rename TFLite Extended -> TFLite Flex
PiperOrigin-RevId: 214854303
Diffstat (limited to 'tensorflow/contrib/lite/python')
-rw-r--r--tensorflow/contrib/lite/python/convert.py8
-rw-r--r--tensorflow/contrib/lite/python/lite_test.py4
2 files changed, 6 insertions, 6 deletions
diff --git a/tensorflow/contrib/lite/python/convert.py b/tensorflow/contrib/lite/python/convert.py
index 73a420c47b..613a1530f7 100644
--- a/tensorflow/contrib/lite/python/convert.py
+++ b/tensorflow/contrib/lite/python/convert.py
@@ -67,12 +67,12 @@ class ConverterMode(enum.Enum):
# Convert model using TOCO such that only unsupported operations are
# represented as TensorFlow ops.
# WARNING: Experimental interface, subject to change.
- TOCO_EXTENDED = "TOCO_EXTENDED"
+ TOCO_FLEX = "TOCO_FLEX"
# Convert model using TOCO such that all operations are represented as
# TensorFlow ops.
# WARNING: Experimental interface, subject to change.
- TOCO_EXTENDED_ALL = "TOCO_EXTENDED_ALL"
+ TOCO_FLEX_ALL = "TOCO_FLEX_ALL"
def __str__(self):
return self.value
@@ -240,9 +240,9 @@ def build_toco_convert_protos(input_tensors,
if dump_graphviz_dir:
toco.dump_graphviz_dir = dump_graphviz_dir
toco.dump_graphviz_include_video = dump_graphviz_video
- if converter_mode == ConverterMode.TOCO_EXTENDED:
+ if converter_mode == ConverterMode.TOCO_FLEX:
toco.allow_flex_ops = True
- elif converter_mode == ConverterMode.TOCO_EXTENDED_ALL:
+ elif converter_mode == ConverterMode.TOCO_FLEX_ALL:
toco.allow_flex_ops = True
toco.force_flex_ops = True
diff --git a/tensorflow/contrib/lite/python/lite_test.py b/tensorflow/contrib/lite/python/lite_test.py
index 7b0df01d1d..d243a494f6 100644
--- a/tensorflow/contrib/lite/python/lite_test.py
+++ b/tensorflow/contrib/lite/python/lite_test.py
@@ -412,7 +412,7 @@ class FromSessionTest(test_util.TensorFlowTestCase):
# Ensure that the quantized weights tflite model is smaller.
self.assertTrue(len(quantized_tflite) < len(float_tflite))
- def testExtendedMode(self):
+ def testFlexMode(self):
in_tensor = array_ops.placeholder(
shape=[1, 16, 16, 3], dtype=dtypes.float32)
out_tensor = in_tensor + in_tensor
@@ -421,7 +421,7 @@ class FromSessionTest(test_util.TensorFlowTestCase):
# Convert model and ensure model is not None.
converter = lite.TFLiteConverter.from_session(sess, [in_tensor],
[out_tensor])
- converter.converter_mode = lite.ConverterMode.TOCO_EXTENDED_ALL
+ converter.converter_mode = lite.ConverterMode.TOCO_FLEX_ALL
tflite_model = converter.convert()
self.assertTrue(tflite_model)