mirror of
https://github.com/vee1e/tflite-micro.git
synced 2026-09-02 18:27:52 +00:00
update the tensorflow.lite to use ai-edge-litert for all python based… (#2702)
This commit is contained in:
parent
68d83a684d
commit
bf2ba11d93
11 changed files with 26 additions and 11 deletions
|
|
@ -94,6 +94,7 @@ py_test(
|
|||
],
|
||||
deps = [
|
||||
":runtime",
|
||||
requirement("ai-edge-litert"),
|
||||
requirement("numpy"),
|
||||
requirement("tensorflow"),
|
||||
"//tensorflow/lite/micro/examples/recipes:add_four_numbers",
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import weakref
|
|||
import numpy as np
|
||||
import tensorflow as tf
|
||||
|
||||
from ai_edge_litert import interpreter as litert_interpreter
|
||||
from tensorflow.python.framework import test_util
|
||||
from tensorflow.python.platform import test
|
||||
from tflite_micro.python.tflite_micro import runtime
|
||||
|
|
@ -199,10 +200,10 @@ class ConvModelTests(test_util.TensorFlowTestCase):
|
|||
tflm_interpreter = runtime.Interpreter.from_bytes(model_data)
|
||||
|
||||
# TFLite interpreter
|
||||
tflite_interpreter = tf.lite.Interpreter(
|
||||
tflite_interpreter = litert_interpreter.Interpreter(
|
||||
model_content=model_data,
|
||||
experimental_op_resolver_type=\
|
||||
tf.lite.experimental.OpResolverType.BUILTIN_REF)
|
||||
litert_interpreter.OpResolverType.BUILTIN_REF)
|
||||
tflite_interpreter.allocate_tensors()
|
||||
tflite_output_details = tflite_interpreter.get_output_details()[0]
|
||||
tflite_input_details = tflite_interpreter.get_input_details()[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue