Skip to content

Commit

Permalink
Fixing package path in tflite test (#3427)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangshangsam authored and tqchen committed Jun 25, 2019
1 parent 25bad44 commit e97c010
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/python/frontend/tflite/test_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@
from tensorflow.python.ops import nn_ops
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import variables
from tensorflow import lite as interpreter_wrapper
try:
from tensorflow import lite as interpreter_wrapper
except ImportError:
from tensorflow.contrib import lite as interpreter_wrapper

import tvm.relay.testing.tf as tf_testing

Expand Down Expand Up @@ -131,7 +134,7 @@ def compare_tflite_with_tvm(in_data, in_name, input_tensors,
if init_global_variables:
sess.run(variables.global_variables_initializer())
# convert to tflite model
converter = tf.contrib.lite.TFLiteConverter.from_session(
converter = interpreter_wrapper.TFLiteConverter.from_session(
sess, input_tensors, output_tensors)
tflite_model_buffer = converter.convert()
tflite_output = run_tflite_graph(tflite_model_buffer, in_data)
Expand Down

0 comments on commit e97c010

Please sign in to comment.