Home
last modified time | relevance | path

Searched refs:tflite_model (Results 1 – 25 of 56) 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/testing/model_coverage/
Dmodel_coverage_lib.py162 def _check_model_quantized_to_16x8(tflite_model): argument
171 interpreter = _get_tflite_interpreter(tflite_model)
187 def _get_tflite_interpreter(tflite_model, argument
205 model_content=tflite_model, custom_op_registerers=custom_op_registerers)
217 def _get_input_data_map(tflite_model, input_data, custom_op_registerers=None): argument
229 tflite_model, custom_op_registerers=custom_op_registerers)
238 def _generate_random_input_data(tflite_model, argument
262 tflite_model,
285 tflite_model, input_data, custom_op_registerers=custom_op_registerers)
289 def _evaluate_tflite_model(tflite_model, argument
[all …]
Dmodel_coverage_quantization_test.py116 tflite_model = converter.convert()
117 model_coverage.compare_model_golden(tflite_model, input_data, golden_name,
/external/tensorflow/tensorflow/lite/python/
Dlite_test.py140 tflite_model = converter.convert()
141 self.assertIsNotNone(tflite_model)
161 tflite_model = converter.convert()
162 self.assertIsNotNone(tflite_model)
165 interpreter = Interpreter(model_content=tflite_model)
235 tflite_model = converter.convert()
236 self.assertIsNotNone(tflite_model)
239 interpreter = Interpreter(model_content=tflite_model)
269 tflite_model = converter.convert()
270 self.assertIsNotNone(tflite_model)
[all …]
Dlite_flex_test.py62 tflite_model = converter.convert()
63 self.assertTrue(tflite_model)
66 interpreter = Interpreter(model_content=tflite_model)
94 tflite_model = converter.convert()
95 self.assertTrue(tflite_model)
98 interpreter = Interpreter(model_content=tflite_model)
130 tflite_model = converter.convert()
133 interpreter = Interpreter(model_content=tflite_model)
191 tflite_model = converter.convert()
193 self.assertIn('FlexCustomAdd4', tflite_test_util.get_ops_list(tflite_model))
[all …]
Dlite_v2_test.py72 tflite_model = converter.convert()
76 actual_value = self._evaluateTFLiteModel(tflite_model, [input_data])
106 tflite_model = converter.convert()
110 actual_value = self._evaluateTFLiteModel(tflite_model, [input_data])
122 tflite_model = converter.convert()
126 actual_value = self._evaluateTFLiteModel(tflite_model, [input_data])
208 tflite_model = converter.convert()
209 self.assertTrue(tflite_model)
239 tflite_model = converter.convert()
240 self.assertTrue(tflite_model)
[all …]
Dlite_v2_test_util.py37 def _evaluateTFLiteModel(self, tflite_model, input_data, input_shapes=None): argument
50 interpreter = Interpreter(model_content=tflite_model)
70 def _evaluateTFLiteModelUsingSignatureDef(self, tflite_model, method_name, argument
84 interpreter = Interpreter(model_content=tflite_model)
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(
76 self.assertTrue(tflite_model)
79 interpreter = Interpreter(model_content=tflite_model)
108 tflite_model = convert.toco_convert_graph_def(
115 self.assertTrue(tflite_model)
118 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.py163 tflite_model = converter.convert()
164 return tflite_model, ""
Dtflite_diff_util.h31 string tflite_model; member
/external/tensorflow/tensorflow/lite/python/optimize/
Dcalibration_wrapper.cc124 auto tflite_model = CreateMutableModel(*model->GetModel()); in AddIntermediateTensors() local
125 if (optimize::AddIntermediateTensorsToFusedOp(&builder, tflite_model.get()) != in AddIntermediateTensors()
316 auto tflite_model = CreateMutableModel(*model_->GetModel()); in Calibrate() local
317 reader_->AddCalibrationToModel(tflite_model.get(), /*update=*/false); in Calibrate()
319 auto loc = tflite::Model::Pack(builder, tflite_model.get()); in Calibrate()
345 auto tflite_model = CreateMutableModel(*model_->GetModel()); in QuantizeModel() local
346 reader_->AddCalibrationToModel(tflite_model.get(), /*update=*/false); in QuantizeModel()
351 &builder, tflite_model.get(), TfLiteTypeToSchemaType(input_type), in QuantizeModel()
378 auto tflite_model = CreateMutableModel(*model_->GetModel()); in QuantizeModel() local
379 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/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.cc257 auto tflite_model = absl::make_unique<tflite::ModelT>(); in MlirQuantizeModel() local
258 model->GetModel()->UnPackTo(tflite_model.get(), nullptr); in MlirQuantizeModel()
278 *tflite_model, inference_io_type, inference_io_type, in MlirQuantizeModel()
308 auto tflite_model = absl::make_unique<tflite::ModelT>(); in MlirSparsifyModel() local
309 model->GetModel()->UnPackTo(tflite_model.get(), nullptr); in MlirSparsifyModel()
313 mlir::lite::SparsifyModel(*tflite_model, &builder, error_reporter.get()); in MlirSparsifyModel()
/external/tensorflow/tensorflow/lite/micro/examples/magic_wand/train/
Dtrain.py158 tflite_model = converter.convert()
161 open("model.tflite", "wb").write(tflite_model)
166 tflite_model = converter.convert()
169 open("model_quantized.tflite", "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.cc329 const tflite::Model* tflite_model, ErrorReporter* error_reporter, in BuildLoggingInterpreter() argument
336 auto subgraphs = tflite_model->subgraphs(); in BuildLoggingInterpreter()
337 auto tensor_buffers = tflite_model->buffers(); in BuildLoggingInterpreter()
353 auto operator_codes = tflite_model->operator_codes(); in BuildLoggingInterpreter()
397 tflite::InterpreterBuilder(tflite_model, *logging_op_resolver, in BuildLoggingInterpreter() local
/external/tensorflow/tensorflow/lite/micro/testing/
Dgenerate_test_models.py70 tflite_model = converter.convert()
71 open("/tmp/tf_micro_conv_test_model.int8.tflite", "wb").write(tflite_model)
/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)
135 tflite_model = converter.convert()
139 f.write(tflite_model)
/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()

123