/aosp_15_r20/external/tensorflow/tensorflow/lite/python/ |
H A D | lite_test.py | 142 tflite_model = converter.convert() 143 self.assertIsNotNone(tflite_model) 163 tflite_model = converter.convert() 164 self.assertIsNotNone(tflite_model) 167 interpreter = Interpreter(model_content=tflite_model) 237 tflite_model = converter.convert() 238 self.assertIsNotNone(tflite_model) 241 interpreter = Interpreter(model_content=tflite_model) 271 tflite_model = converter.convert() 272 self.assertIsNotNone(tflite_model) [all …]
|
H A D | lite_flex_test.py | 61 tflite_model = converter.convert() 62 self.assertTrue(tflite_model) 65 interpreter = Interpreter(model_content=tflite_model) 88 tflite_model = converter.convert() 89 self.assertTrue(tflite_model) 90 self.assertIn('FlexL2Loss', tflite_test_util.get_ops_list(tflite_model)) 108 tflite_model = converter.convert() 109 self.assertTrue(tflite_model) 112 interpreter = Interpreter(model_content=tflite_model) 145 tflite_model = converter.convert() [all …]
|
H A D | lite_v2_test.py | 93 tflite_model = converter.convert() 97 actual_value = self._evaluateTFLiteModel(tflite_model, [input_data]) 129 tflite_model = converter.convert() 133 actual_value = self._evaluateTFLiteModel(tflite_model, [input_data]) 151 tflite_model = converter.convert() 156 interpreter = tf.lite.Interpreter(model_content=tflite_model) 185 tflite_model = converter.convert() 186 self.assertIsNotNone(tflite_model) 198 tflite_model = converter.convert() 202 actual_value = self._evaluateTFLiteModel(tflite_model, [input_data]) [all …]
|
H A D | convert_test.py | 43 tflite_model = convert.convert_graphdef( 45 self.assertTrue(tflite_model) 55 tflite_model = convert.convert_graphdef( 61 self.assertTrue(tflite_model) 70 tflite_model = convert.convert_graphdef_with_arrays( 77 self.assertTrue(tflite_model) 80 interpreter = Interpreter(model_content=tflite_model) 107 tflite_model = convert.convert_graphdef_with_arrays( 117 self.assertTrue(tflite_model) 120 interpreter = Interpreter(model_content=tflite_model)
|
H A D | analyzer.py | 91 tflite_model = model_path 95 tflite_model = model_content 100 wrap_toco.wrapped_flat_buffer_file_to_mlir(tflite_model, 104 _analyzer_wrapper.ModelAnalyzer(tflite_model, input_is_filepath,
|
H A D | lite_v2_test_util.py | 38 def _evaluateTFLiteModel(self, tflite_model, input_data, input_shapes=None): argument 51 interpreter = Interpreter(model_content=tflite_model) 71 def _evaluateTFLiteModelUsingSignatureDef(self, tflite_model, signature_key, argument 85 interpreter = Interpreter(model_content=tflite_model)
|
H A D | util_test.py | 84 tflite_model = converter.convert() 85 interpreter = tf.lite.Interpreter(model_content=tflite_model) 293 tflite_model = converter.convert() 295 return tflite_model
|
/aosp_15_r20/external/tensorflow/tensorflow/lite/tools/signature/ |
H A D | signature_def_utils.py | 24 def set_signature_defs(tflite_model, signature_def_map): argument 40 model = tflite_model 41 if not isinstance(tflite_model, bytearray): 42 model = bytearray(tflite_model) 50 def get_signature_defs(tflite_model): argument 66 model = tflite_model 67 if not isinstance(tflite_model, bytearray): 68 model = bytearray(tflite_model) 77 def clear_signature_defs(tflite_model): argument 91 model = tflite_model [all …]
|
H A D | signature_def_utils_test.py | 37 tflite_model = bytearray(fp.read()) 39 self.assertIsNotNone(tflite_model, 'TFLite model is none') 54 tflite_model = signature_def_utils.set_signature_defs( 55 tflite_model, signature_def_map) 57 tflite_model) 63 signature_def_utils.clear_signature_defs(tflite_model))
|
/aosp_15_r20/external/tensorflow/tensorflow/lite/g3doc/r1/convert/ |
H A D | python_api.md | 38 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 …]
|
/aosp_15_r20/external/tensorflow/tensorflow/lite/python/optimize/ |
H A D | calibration_wrapper.cc | 177 auto tflite_model = CreateMutableModel(*model->GetModel()); in AddIntermediateTensors() local 178 if (optimize::AddIntermediateTensorsToFusedOp(&builder, tflite_model.get()) != in AddIntermediateTensors() 548 auto tflite_model = CreateMutableModel(*model_->GetModel()); in Calibrate() local 549 reader_->AddCalibrationToModel(tflite_model.get(), /*update=*/false); in Calibrate() 551 auto loc = tflite::Model::Pack(builder, tflite_model.get()); in Calibrate() 587 auto tflite_model = CreateMutableModel(*model_->GetModel()); in QuantizeModel() local 588 reader_->AddCalibrationToModel(tflite_model.get(), /*update=*/false); in QuantizeModel() 593 &builder, tflite_model.get(), TfLiteTypeToSchemaType(input_type), in QuantizeModel() 622 auto tflite_model = CreateMutableModel(*model_->GetModel()); in QuantizeModel() local 623 reader_->AddCalibrationToModel(tflite_model.get(), /*update=*/false); in QuantizeModel() [all …]
|
/aosp_15_r20/external/tensorflow/tensorflow/lite/testing/ |
H A D | mlir_convert.py | 50 tflite_model = None 117 tflite_model = converter.convert() 119 ops_list = tflite_test_util.get_ops_list(tflite_model) 123 tflite_model = None 129 return tflite_model, log
|
H A D | tflite_diff_util.cc | 35 ? options.tflite_model in SingleRunDiffTestWithProvidedRunner() 45 runner->LoadModel(options.tflite_model); in SingleRunDiffTestWithProvidedRunner() 53 tflite_stream, options.tensorflow_model, options.tflite_model, in RunDiffTest() 59 tflite_driver.LoadModel(options.tflite_model); in RunDiffTest()
|
H A D | tflite_diff_flags.h | 33 string tflite_model; in ParseTfliteDiffFlags() member 47 tensorflow::Flag("tflite_model", &values.tflite_model, in ParseTfliteDiffFlags() 77 } else if (values.tensorflow_model.empty() || values.tflite_model.empty() || in ParseTfliteDiffFlags() 99 values.tflite_model, in ParseTfliteDiffFlags()
|
/aosp_15_r20/external/tflite-support/tensorflow_lite_support/custom_ops/python/ |
H A D | sentencepiece_tokenizer_test.py | 128 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,
|
H A D | ragged_tensor_to_tensor_test.py | 40 tflite_model = converter.convert() 42 model_content=tflite_model,
|
/aosp_15_r20/external/tensorflow/tensorflow/lite/experimental/mlir/testing/ |
H A D | mlir_convert.py | 52 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
|
/aosp_15_r20/external/tensorflow/tensorflow/lite/testing/kernel_test/ |
H A D | util.h | 32 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()
|
/aosp_15_r20/external/tensorflow/tensorflow/lite/toco/python/ |
H A D | toco_python_api.cc | 325 auto tflite_model = std::make_unique<tflite::ModelT>(); in MlirQuantizeModel() local 326 model->GetModel()->UnPackTo(tflite_model.get(), nullptr); in MlirQuantizeModel() 337 *tflite_model, input_type, output_type, inference_tensor_type, {}, in MlirQuantizeModel() 368 auto tflite_model = std::make_unique<tflite::ModelT>(); in MlirSparsifyModel() local 369 model->GetModel()->UnPackTo(tflite_model.get(), nullptr); in MlirSparsifyModel() 373 mlir::lite::SparsifyModel(*tflite_model, &builder, error_reporter.get()); in MlirSparsifyModel()
|
/aosp_15_r20/external/tensorflow/tensorflow/lite/tools/optimize/calibration/ |
H A D | calibrator.cc | 382 const tflite::Model* tflite_model, ErrorReporter* error_reporter, in BuildLoggingInterpreter() argument 389 auto subgraphs = tflite_model->subgraphs(); in BuildLoggingInterpreter() 390 auto tensor_buffers = tflite_model->buffers(); in BuildLoggingInterpreter() 404 auto operator_codes = tflite_model->operator_codes(); in BuildLoggingInterpreter() 462 tflite::InterpreterBuilder(tflite_model, *logging_op_resolver, in BuildLoggingInterpreter() local
|
/aosp_15_r20/external/tensorflow/tensorflow/lite/g3doc/examples/convert/ |
H A D | convert_models.md | 69 tflite_model = converter.convert() 73 f.write(tflite_model) 97 tflite_model = converter.convert() 101 f.write(tflite_model) 127 tflite_model = converter.convert() 131 f.write(tflite_model)
|
/aosp_15_r20/external/tensorflow/tensorflow/lite/g3doc/guide/ |
H A D | signatures.ipynb | 232 "tflite_model = converter.convert()\n", 235 "interpreter = tf.lite.Interpreter(model_content=tflite_model)\n", 270 "tflite_model = converter.convert()\n", 273 "interpreter = tf.lite.Interpreter(model_content=tflite_model)\n", 308 "tflite_model = converter.convert()\n", 311 "interpreter = tf.lite.Interpreter(model_content=tflite_model)\n", 430 "interpreter = tf.lite.Interpreter(model_content=tflite_model)\n",
|
/aosp_15_r20/external/libtextclassifier/native/annotator/pod_ner/ |
H A D | pod-ner-impl.cc | 104 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()
|
/aosp_15_r20/external/tensorflow/tensorflow/lite/experimental/acceleration/mini_benchmark/metrics/ |
H A D | mobilenet.py | 58 tflite_model = converter.convert() 59 open(output_path, 'wb').write(tflite_model)
|
/aosp_15_r20/external/tensorflow/tensorflow/python/kernel_tests/signal/ |
H A D | test_util.py | 68 def evaluate_tflite_model(tflite_model, input_ndarrays): argument 82 the_interpreter = interpreter.Interpreter(model_content=tflite_model)
|