Skip to content

Commit efa85db

Browse files
ecalubaquibcopybara-github
authored andcommitted
Update tensorflow_models usage of tf.lite.interpreter to run ai-edge-litert.interpreter
PiperOrigin-RevId: 682467705
1 parent 8f60a93 commit efa85db

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ OpenEXR >= 1.3.2
1212
termcolor >= 1.1.0
1313
trimesh >= 2.37.22
1414
# Required by trimesh.
15-
networkx
15+
networkx

tensorflow_graphics/util/test_case.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
import tensorflow as tf
3232

3333
from tensorflow_graphics.util import tfg_flags
34+
# pylint: disable=g-direct-tensorflow-import
35+
from ai-edge-litert import interpreter as tfl_interpreter
36+
# pylint: enable=g-direct-tensorflow-import
37+
3438

3539
FLAGS = flags.FLAGS
3640

@@ -364,7 +368,7 @@ def assert_tf_lite_convertible(self,
364368
sess, in_tensors, out_tensors)
365369
tflite_model = converter.convert()
366370
# Load TFLite model and allocate tensors.
367-
interpreter = tf.lite.Interpreter(model_content=tflite_model)
371+
interpreter = tfl_interpreter.Interpreter(model_content=tflite_model)
368372
interpreter.allocate_tensors()
369373
# If no test inputs provided then randomly generate inputs.
370374
if test_inputs is None:

0 commit comments

Comments
 (0)