Home
last modified time | relevance | path

Searched refs:tflite_model (Results 1 – 25 of 57) sorted by relevance

123

/external/tensorflow/tensorflow/lite/tools/signature/
Dsignature_def_utils.py25 def set_signature_defs(tflite_model, signature_def_map): argument
41 model = tflite_model
42 if not isinstance(tflite_model, bytearray):
43 model = bytearray(tflite_model)
51 def get_signature_defs(tflite_model): argument
67 model = tflite_model
68 if not isinstance(tflite_model, bytearray):
69 model = bytearray(tflite_model)
78 def clear_signature_defs(tflite_model): argument
92 model = tflite_model
[all …]
Dsignature_def_utils_test.py41 tflite_model = bytearray(fp.read())
43 self.assertIsNotNone(tflite_model, 'TFLite model is none')
58 tflite_model = signature_def_utils.set_signature_defs(
59 tflite_model, signature_def_map)
61 tflite_model)
67 signature_def_utils.clear_signature_defs(tflite_model))
/external/tensorflow/tensorflow/lite/python/
Dlite_test.py146 tflite_model = converter.convert()
147 self.assertIsNotNone(tflite_model)
167 tflite_model = converter.convert()
168 self.assertIsNotNone(tflite_model)
171 interpreter = Interpreter(model_content=tflite_model)
241 tflite_model = converter.convert()
242 self.assertIsNotNone(tflite_model)
245 interpreter = Interpreter(model_content=tflite_model)
275 tflite_model = converter.convert()
276 self.assertIsNotNone(tflite_model)
[all …]
Dlite_flex_test.py63 tflite_model = converter.convert()
64 self.assertTrue(tflite_model)
67 interpreter = Interpreter(model_content=tflite_model)
90 tflite_model = converter.convert()
91 self.assertTrue(tflite_model)
92 self.assertIn('FlexL2Loss', tflite_test_util.get_ops_list(tflite_model))
110 tflite_model = converter.convert()
111 self.assertTrue(tflite_model)
114 interpreter = Interpreter(model_content=tflite_model)
147 tflite_model = converter.convert()
[all …]
Dlite_v2_test.py89 tflite_model = converter.convert()
93 actual_value = self._evaluateTFLiteModel(tflite_model, [input_data])
125 tflite_model = converter.convert()
129 actual_value = self._evaluateTFLiteModel(tflite_model, [input_data])
142 tflite_model = converter.convert()
146 actual_value = self._evaluateTFLiteModel(tflite_model, [input_data])
160 tflite_model = converter.convert()
163 interpreter = Interpreter(model_content=tflite_model)
251 tflite_model = converter.convert()
252 self.assertTrue(tflite_model)
[all …]
Danalyzer.py73 tflite_model = model_path
77 tflite_model = model_content
81 print(_analyzer_wrapper.FlatBufferToMlir(tflite_model, input_is_filepath))
84 _analyzer_wrapper.ModelAnalyzer(tflite_model, input_is_filepath,
Dconvert_test.py47 tflite_model = convert.toco_convert(sess.graph_def, [in_tensor],
49 self.assertTrue(tflite_model)
59 tflite_model = convert.toco_convert(
63 self.assertTrue(tflite_model)
72 tflite_model = convert.toco_convert_graph_def(
77 self.assertTrue(tflite_model)
80 interpreter = Interpreter(model_content=tflite_model)
109 tflite_model = convert.toco_convert_graph_def(
117 self.assertTrue(tflite_model)
120 interpreter = Interpreter(model_content=tflite_model)
Dlite_v2_test_util.py40 def _evaluateTFLiteModel(self, tflite_model, input_data, input_shapes=None): argument
53 interpreter = Interpreter(model_content=tflite_model)
73 def _evaluateTFLiteModelUsingSignatureDef(self, tflite_model, signature_key, argument
87 interpreter = Interpreter(model_content=tflite_model)
/external/tensorflow/tensorflow/lite/testing/
Dtflite_diff_util.cc34 ? options.tflite_model in SingleRunDiffTestWithProvidedRunner()
44 runner->LoadModel(options.tflite_model); in SingleRunDiffTestWithProvidedRunner()
52 tflite_stream, options.tensorflow_model, options.tflite_model, in RunDiffTest()
58 tflite_driver.LoadModel(options.tflite_model); in RunDiffTest()
Dtflite_diff_flags.h32 string tflite_model; in ParseTfliteDiffFlags() member
46 tensorflow::Flag("tflite_model", &values.tflite_model, in ParseTfliteDiffFlags()
76 } else if (values.tensorflow_model.empty() || values.tflite_model.empty() || in ParseTfliteDiffFlags()
98 values.tflite_model, in ParseTfliteDiffFlags()
Dtoco_convert.py160 tflite_model = converter.convert()
161 return tflite_model, ""
/external/tensorflow/tensorflow/lite/python/optimize/
Dcalibration_wrapper.cc151 auto tflite_model = CreateMutableModel(*model->GetModel()); in AddIntermediateTensors() local
152 if (optimize::AddIntermediateTensorsToFusedOp(&builder, tflite_model.get()) != in AddIntermediateTensors()
343 auto tflite_model = CreateMutableModel(*model_->GetModel()); in Calibrate() local
344 reader_->AddCalibrationToModel(tflite_model.get(), /*update=*/false); in Calibrate()
346 auto loc = tflite::Model::Pack(builder, tflite_model.get()); in Calibrate()
381 auto tflite_model = CreateMutableModel(*model_->GetModel()); in QuantizeModel() local
382 reader_->AddCalibrationToModel(tflite_model.get(), /*update=*/false); in QuantizeModel()
387 &builder, tflite_model.get(), TfLiteTypeToSchemaType(input_type), in QuantizeModel()
415 auto tflite_model = CreateMutableModel(*model_->GetModel()); in QuantizeModel() local
416 reader_->AddCalibrationToModel(tflite_model.get(), /*update=*/false); in QuantizeModel()
[all …]
/external/tensorflow/tensorflow/lite/testing/kernel_test/
Dutil.h32 string tflite_model; member
48 tensorflow::Flag("tflite_model", &options.tflite_model, in ParseTfliteKernelTestFlags()
72 TF_LITE_ENSURE_STATUS(input_generator.LoadModel(options.tflite_model)); in RunKernelTest()
80 runner->LoadModel(options.tflite_model); in RunKernelTest()
/external/tensorflow/tensorflow/lite/g3doc/r1/convert/
Dpython_api.md38 tflite_model = converter.convert()
42 f.write(tflite_model)
56 tflite_model = converter.convert()
60 f.write(tflite_model)
91 tflite_model = converter.convert()
95 f.write(tflite_model)
116 tflite_model = converter.convert()
120 f.write(tflite_model)
144 tflite_model = converter.convert()
148 f.write(tflite_model)
[all …]
/external/tensorflow/tensorflow/lite/experimental/mlir/testing/
Dmlir_convert.py52 tflite_model = None
110 tflite_model = converter.convert()
112 ops_list = tflite_test_util.get_ops_list(tflite_model)
116 tflite_model = None
122 return tflite_model, log
/external/tflite-support/tensorflow_lite_support/custom_ops/python/
Dsentencepiece_tokenizer_test.py128 tflite_model = converter.convert()
130 model_content=tflite_model,
171 tflite_model = converter.convert()
173 model_content=tflite_model,
209 tflite_model = converter.convert()
211 model_content=tflite_model,
Dragged_tensor_to_tensor_test.py40 tflite_model = converter.convert()
42 model_content=tflite_model,
/external/tensorflow/tensorflow/lite/toco/python/
Dtoco_python_api.cc311 auto tflite_model = absl::make_unique<tflite::ModelT>(); in MlirQuantizeModel() local
312 model->GetModel()->UnPackTo(tflite_model.get(), nullptr); in MlirQuantizeModel()
323 *tflite_model, input_type, output_type, inference_tensor_type, {}, in MlirQuantizeModel()
354 auto tflite_model = absl::make_unique<tflite::ModelT>(); in MlirSparsifyModel() local
355 model->GetModel()->UnPackTo(tflite_model.get(), nullptr); in MlirSparsifyModel()
359 mlir::lite::SparsifyModel(*tflite_model, &builder, error_reporter.get()); in MlirSparsifyModel()
/external/tensorflow/tensorflow/lite/experimental/acceleration/mini_benchmark/metrics/
Dmobilenet.py62 tflite_model = converter.convert()
63 open(output_path, 'wb').write(tflite_model)
Dblazeface_metrics.py118 tflite_model = converter.convert()
119 open(output_path, 'wb').write(tflite_model)
/external/tensorflow/tensorflow/python/kernel_tests/signal/
Dtest_util.py72 def evaluate_tflite_model(tflite_model, input_ndarrays): argument
86 the_interpreter = interpreter.Interpreter(model_content=tflite_model)
/external/tensorflow/tensorflow/lite/tools/optimize/calibration/
Dcalibrator.cc376 const tflite::Model* tflite_model, ErrorReporter* error_reporter, in BuildLoggingInterpreter() argument
383 auto subgraphs = tflite_model->subgraphs(); in BuildLoggingInterpreter()
384 auto tensor_buffers = tflite_model->buffers(); in BuildLoggingInterpreter()
398 auto operator_codes = tflite_model->operator_codes(); in BuildLoggingInterpreter()
458 tflite::InterpreterBuilder(tflite_model, *logging_op_resolver, in BuildLoggingInterpreter() local
/external/tensorflow/tensorflow/lite/g3doc/guide/
Dsignatures.ipynb247 "tflite_model = converter.convert()\n",
250 "interpreter = tf.lite.Interpreter(model_content=tflite_model)\n",
285 "tflite_model = converter.convert()\n",
288 "interpreter = tf.lite.Interpreter(model_content=tflite_model)\n",
323 "tflite_model = converter.convert()\n",
326 "interpreter = tf.lite.Interpreter(model_content=tflite_model)\n",
445 "interpreter = tf.lite.Interpreter(model_content=tflite_model)\n",
/external/libtextclassifier/native/annotator/pod_ner/
Dpod-ner-impl.cc104 if (model->tflite_model() == nullptr) { in CreateInterpreter()
109 const tflite::Model *tflite_model = in CreateInterpreter() local
110 tflite::GetModel(model->tflite_model()->Data()); in CreateInterpreter()
111 if (tflite_model == nullptr) { in CreateInterpreter()
133 tflite::InterpreterBuilder(tflite_model, *resolver, in CreateInterpreter()
/external/tensorflow/tensorflow/lite/g3doc/convert/
Dindex.md77 tflite_model = converter.convert()
81 f.write(tflite_model)
105 tflite_model = converter.convert()
109 f.write(tflite_model)
138 tflite_model = converter.convert()
142 f.write(tflite_model)

123