Home
last modified time | relevance | path

Searched refs:model_ (Results 1 – 25 of 71) sorted by relevance

123

/external/tensorflow/tensorflow/lite/tools/optimize/
Dquantize_model_test.cc74 readonly_model_->UnPackTo(&model_); in QuantizeModelTest()
79 tflite::ModelT model_; member in tflite::optimize::__anon69e5b5ed0211::QuantizeModelTest
129 readonly_model_->UnPackTo(&model_); in QuantizeConvModelTest()
140 QuantizeModelAllOperators(&builder_, &model_, tensor_type_, tensor_type_, in TEST_P()
150 &builder_, &model_, TensorType_FLOAT32, TensorType_FLOAT32, in TEST_P()
153 ASSERT_EQ(model_.subgraphs.size(), readonly_model_->subgraphs()->size()); in TEST_P()
155 ASSERT_EQ(model_.subgraphs.size(), readonly_model_->subgraphs()->size()); in TEST_P()
156 for (size_t subgraph_idx = 0; subgraph_idx < model_.subgraphs.size(); in TEST_P()
158 const auto quantized_graph = model_.subgraphs[subgraph_idx].get(); in TEST_P()
175 QuantizeModelAllOperators(&builder_, &model_, tensor_type_, tensor_type_, in TEST_P()
[all …]
Dquantize_weights_test.cc76 model_ = input_model_->GetModel(); in LoadBasicModel()
81 model_ = input_model_->GetModel(); in LoadSharedWeightsModel()
86 model_ = input_model_->GetModel(); in LoadGatherTestModel()
91 model_ = input_model_->GetModel(); in LoadCustomOpTestModel()
95 const Model* model_; member in tflite::optimize::__anone97e71570211::QuantizeWeightsTest
98 for (size_t subgraph_idx = 0; subgraph_idx < model_->subgraphs()->size(); in IsModelInputOrOutput()
137 auto status = QuantizeWeights(&builder, model_, 0); in TEST_F()
151 EXPECT_EQ(QuantizeWeights(&builder, model_, kWeightsMinNumElements), in TEST_F()
158 for (size_t subgraph_idx = 0; subgraph_idx < model_->subgraphs()->size(); in TEST_F()
161 const auto float_graph = model_->subgraphs()->Get(subgraph_idx); in TEST_F()
[all …]
/external/libtextclassifier/native/actions/
Dactions-suggestions.cc120 actions->model_ = model; in FromUnownedBuffer()
145 actions->model_ = model; in FromScopedMmap()
172 actions->model_ = model; in FromScopedMmap()
257 if (model_ == nullptr) { in ValidateAndInitialize()
262 if (model_->smart_reply_action_type() == nullptr) { in ValidateAndInitialize()
272 if (model_->locales() && in ValidateAndInitialize()
273 !ParseLocales(model_->locales()->c_str(), &locales_)) { in ValidateAndInitialize()
278 if (model_->tflite_model_spec() != nullptr) { in ValidateAndInitialize()
280 model_->tflite_model_spec()->tflite_model()); in ValidateAndInitialize()
288 if (model_->annotation_actions_spec() != nullptr && in ValidateAndInitialize()
[all …]
Dngram-model.cc37 : model_(model), index_(index) {} in FirstTokenIterator()
51 const uint32 token_offset = (*model_->ngram_start_offsets())[index_]; in operator *()
52 return (*model_->hashed_ngram_tokens())[token_offset]; in operator *()
57 const NGramLinearRegressionModel* model_; member in libtextclassifier3::__anon974867250111::FirstTokenIterator
80 : model_(model) { in NGramSensitiveModel()
146 const int num_ngrams = model_->ngram_weights()->size(); in GetFirstTokenMatches()
147 const auto start_it = FirstTokenIterator(model_, 0); in GetFirstTokenMatches()
148 const auto end_it = FirstTokenIterator(model_, num_ngrams); in GetFirstTokenMatches()
160 return std::make_pair(false, model_->default_token_weight()); in Eval()
174 tokens.size(), model_->max_denom_ngram_length(), model_->max_skips()); in Eval()
[all …]
/external/tensorflow/tensorflow/lite/toco/graph_transformations/tests/
Dremove_successive_transpose_test.cc32 void SetUp() override { model_.reset(new toco::Model); } in SetUp()
35 toco::Array& array = model_->GetOrCreateArray(name); in CreateArray()
45 toco::Array& array = model_->GetOrCreateArray(name); in CreateConstantArray()
70 model_->operators.push_back(std::unique_ptr<toco::Operator>(add_op)); in CreateGraph()
76 model_->operators.push_back(std::unique_ptr<toco::Operator>(transpose_op)); in CreateGraph()
82 model_->operators.push_back(std::unique_ptr<toco::Operator>(transpose2_op)); in CreateGraph()
87 model_->operators.push_back(std::unique_ptr<toco::Operator>(add2_op)); in CreateGraph()
90 std::unique_ptr<toco::Model> model_; member in __anon68f38e040111::RemoveSuccessiveTransposeTest
99 ASSERT_TRUE(transformation.Run(model_.get(), /*op_index=*/1, &modified).ok()); in TEST_F()
102 ASSERT_EQ(model_->operators.size(), 2); in TEST_F()
[all …]
Dfuse_binary_into_following_affine_test.cc44 void SetUp() override { model_.reset(new Model); } in SetUp()
47 Array& array = model_->GetOrCreateArray(name); in CreateArray()
57 Array& array = model_->GetOrCreateArray(name); in CreateConstantArray()
70 std::unique_ptr<Model> model_; member in toco::FuseBinaryIntoFollowingAffineTest
86 model_->operators.push_back(std::unique_ptr<Operator>(mul_op)); in TEST_F()
91 model_->operators.push_back(std::unique_ptr<Operator>(fc_op)); in TEST_F()
95 ASSERT_TRUE(transformation.Run(model_.get(), /*op_index=*/0, &modified).ok()); in TEST_F()
99 ASSERT_EQ(model_->operators.size(), 1); in TEST_F()
100 const auto& op = model_->operators[0]; in TEST_F()
104 auto& weights_array = model_->GetArray(op->inputs[1]); in TEST_F()
[all …]
Dfuse_binary_into_preceding_affine_test.cc44 void SetUp() override { model_.reset(new Model); } in SetUp()
47 Array& array = model_->GetOrCreateArray(name); in CreateArray()
57 Array& array = model_->GetOrCreateArray(name); in CreateConstantArray()
70 std::unique_ptr<Model> model_; member in toco::FuseBinaryIntoPrecedingAffineTest
90 model_->operators.push_back(std::unique_ptr<Operator>(tc_op)); in TEST_F()
95 model_->operators.push_back(std::unique_ptr<Operator>(add_op)); in TEST_F()
99 ASSERT_TRUE(transformation.Run(model_.get(), /*op_index=*/1, &modified).ok()); in TEST_F()
103 ASSERT_EQ(model_->operators.size(), 1); in TEST_F()
104 const auto& op = model_->operators[0]; in TEST_F()
108 auto& weights_array = model_->GetArray(op->inputs[1]); in TEST_F()
[all …]
/external/tensorflow/tensorflow/core/graph/
Dedgeset_test.cc35 model_.clear(); in MakeEdgeSet()
38 model_.insert(&edges_[i]); in MakeEdgeSet()
43 EXPECT_EQ(model_.size(), eset_.size()); in CheckSame()
44 EXPECT_EQ(model_.empty(), eset_.empty()); in CheckSame()
45 std::vector<const Edge*> modelv(model_.begin(), model_.end()); in CheckSame()
59 std::set<const Edge*> model_; member in tensorflow::EdgeSetTest
72 model_.clear(); in TEST_F()
76 model_.insert(&edges_[0]); in TEST_F()
91 model_.erase(&edges_[pos]); in TEST_F()
/external/libtextclassifier/native/annotator/
Dannotator.cc296 model_ = model; in ValidateAndInitialize()
302 if (model_ == nullptr) { in ValidateAndInitialize()
308 (model_->triggering_options() != nullptr && in ValidateAndInitialize()
309 (model_->triggering_options()->enabled_modes() & ModeFlag_ANNOTATION)); in ValidateAndInitialize()
311 (model_->triggering_options() != nullptr && in ValidateAndInitialize()
312 (model_->triggering_options()->enabled_modes() & in ValidateAndInitialize()
315 (model_->triggering_options() != nullptr && in ValidateAndInitialize()
316 (model_->triggering_options()->enabled_modes() & ModeFlag_SELECTION)); in ValidateAndInitialize()
320 if (!model_->selection_options()) { in ValidateAndInitialize()
324 if (!model_->selection_feature_options()) { in ValidateAndInitialize()
[all …]
/external/tflite-support/tensorflow_lite_support/cc/task/core/
Dtflite_engine.cc69 : model_(nullptr, TfLiteModelDelete), in TfLiteEngine()
74 : model_(), resolver_(std::move(resolver)), verifier_(resolver_.get()) {} in TfLiteEngine()
111 model_ = nullptr; in VerifyAndBuildModelFromBuffer()
117 model_ = nullptr; in VerifyAndBuildModelFromBuffer()
121 model_.reset(TfLiteModelCreate(buffer_data, buffer_size)); in VerifyAndBuildModelFromBuffer()
123 model_ = tflite::FlatBufferModel::VerifyAndBuildFromBuffer( in VerifyAndBuildModelFromBuffer()
132 if (model_ == nullptr) { in InitializeFromModelFileHandler()
162 if (model_) { in BuildModelFromFlatBuffer()
174 if (model_) { in BuildModelFromFile()
186 if (model_) { in BuildModelFromFileDescriptor()
[all …]
/external/tensorflow/tensorflow/lite/tools/signature/
Dsignature_def_util_test.cc45 model_ = flatbuffer_model_->GetModel(); in SetUp()
46 ASSERT_NE(model_, nullptr); in SetUp()
61 const Model* model_; member in tflite::__anonb56b79ca0111::SimpleSignatureDefUtilTest
69 EXPECT_EQ(Status::OK(), SetSignatureDefMap(model_, expected_signature_def_map, in TEST_F()
87 EXPECT_EQ(Status::OK(), SetSignatureDefMap(model_, expected_signature_def_map, in TEST_F()
122 EXPECT_EQ(Status::OK(), GetSignatureDefMap(model_, &test_signature_def_map)); in TEST_F()
123 EXPECT_FALSE(HasSignatureDef(model_, kDefaultServingSignatureDefKey)); in TEST_F()
127 const int expected_num_buffers = model_->buffers()->size(); in TEST_F()
132 EXPECT_EQ(Status::OK(), SetSignatureDefMap(model_, expected_signature_def_map, in TEST_F()
153 SetSignatureDefMap(model_, test_signature_def_map, &model_output))); in TEST_F()
[all …]
/external/libtextclassifier/native/lang_id/common/
Dembedding-network.cc289 : model_(model) { in EmbeddingNetwork()
291 for (int i = 0; i < model_->embedding_num_features_size(); ++i) { in EmbeddingNetwork()
293 EmbeddingNetworkParams::Matrix matrix = model_->GetEmbeddingMatrix(i); in EmbeddingNetwork()
294 offset_sum += matrix.cols * model_->embedding_num_features(i); in EmbeddingNetwork()
303 SAFTM_CHECK_EQ(model_->hidden_size(), model_->hidden_bias_size()); in EmbeddingNetwork()
304 for (int i = 0; i < model_->hidden_size(); ++i) { in EmbeddingNetwork()
305 layer_weights_.push_back(model_->GetHiddenLayerMatrix(i)); in EmbeddingNetwork()
307 EmbeddingNetworkParams::Matrix bias = model_->GetHiddenLayerBias(i); in EmbeddingNetwork()
313 SAFTM_CHECK(model_->HasSoftmax()); in EmbeddingNetwork()
314 layer_weights_.push_back(model_->GetSoftmaxMatrix()); in EmbeddingNetwork()
[all …]
/external/dynamic_depth/internal/dynamic_depth/
Dvendor_info.cc24 VendorInfo::VendorInfo() : manufacturer_(""), model_(""), notes_("") {} in VendorInfo()
45 vendor_info->model_ = model; in FromData()
67 const string& VendorInfo::GetModel() const { return model_; } in GetModel()
83 if (!model_.empty()) { in Serialize()
84 serializer->WriteProperty(DynamicDepthConst::VendorInfo(), kModel, model_); in Serialize()
101 deserializer.ParseString(DynamicDepthConst::VendorInfo(), kModel, &model_); in ParseFields()
/external/libtextclassifier/native/annotator/pod_ner/
Dpod-ner-impl_test.cc78 model_ = static_cast<const PodNerModel*>( in PodNerTest()
98 const PodNerModel* model_; member in libtextclassifier3::__anonc842bf600111::PodNerTest
106 PodNerAnnotator::Create(model_, *unilib_); in TEST_F()
129 PodNerAnnotator::Create(model_, *unilib_); in TEST_F()
188 PodNerAnnotator::Create(model_, *unilib_); in TEST_F()
213 std::unique_ptr<PodNerModelT> unpacked_model(model_->UnPack()); in TEST_F()
262 PodNerAnnotator::Create(model_, *unilib_); in TEST_F()
272 std::unique_ptr<PodNerModelT> unpacked_model(model_->UnPack()); in TEST_F()
296 PodNerAnnotator::Create(model_, *unilib_); in TEST_F()
306 std::unique_ptr<PodNerModelT> unpacked_model(model_->UnPack()); in TEST_F()
[all …]
/external/tensorflow/tensorflow/lite/
Dmodel_builder.cc146 if (!model_ || !model_->metadata()) return ""; in GetMinimumRuntime()
148 for (int i = 0; i < model_->metadata()->size(); ++i) { in GetMinimumRuntime()
149 auto metadata = model_->metadata()->Get(i); in GetMinimumRuntime()
152 auto* buffer = (*model_->buffers())[buf]; in GetMinimumRuntime()
186 : model_(model), error_reporter_(ValidateErrorReporter(error_reporter)) {} in FlatBufferModel()
194 model_ = ::tflite::GetModel(allocation_->base()); in FlatBufferModel()
Dmodel_builder.h129 bool initialized() const { return model_ != nullptr; } in initialized()
130 const tflite::Model* operator->() const { return model_; }
131 const tflite::Model* GetModel() const { return model_; } in GetModel()
164 const tflite::Model* model_ = nullptr; variable
/external/tensorflow/tensorflow/lite/experimental/acceleration/configuration/
Dnnapi_plugin_test.cc72 model_.Build(); in SetUp()
122 SingleAddOpModel model_; member in tflite::__anon04ac112d0111::NNAPIPluginTest
132 EXPECT_EQ(model_.Interpreter()->ModifyGraphWithDelegate(delegate_.get()), in TEST_F()
137 EXPECT_EQ(model_.Interpreter()->ModifyGraphWithDelegate(delegate_.get()), in TEST_F()
176 EXPECT_EQ(model_.Interpreter()->ModifyGraphWithDelegate(delegate_.get()), in TEST_F()
192 EXPECT_EQ(model_.Interpreter()->ModifyGraphWithDelegate(delegate_.get()), in TEST_F()
208 EXPECT_EQ(model_.Interpreter()->ModifyGraphWithDelegate(delegate_.get()), in TEST_F()
/external/tensorflow/tensorflow/lite/micro/
Dmicro_interpreter.cc51 : allocator_(allocator), error_reporter_(error_reporter), model_(model) {} in ContextHelper()
87 helper->model_, helper->eval_tensors_, tensor_idx); in GetTensor()
113 : model_(model), in MicroInterpreter()
132 : model_(model), in MicroInterpreter()
162 model_->subgraphs(); in Init()
182 if (allocator_.StartModelAllocation(model_, op_resolver_, in AllocateTensors()
248 allocator_.FinishModelAllocation(model_, eval_tensors_, in AllocateTensors()
269 model_, eval_tensors_, inputs().Get(i)); in AllocateTensors()
293 model_, eval_tensors_, outputs().Get(i)); in AllocateTensors()
386 return allocator_.AllocatePersistentTfLiteTensor(model_, eval_tensors_, in tensor()
/external/libtextclassifier/native/annotator/grammar/
Dgrammar-annotator.cc83 model_(model), in GrammarAnnotator()
105 model_->rule_classification_result()->Get(derivation.rule_id)); in OverlappingDerivations()
212 model_->rule_classification_result()->Get(derivation.rule_id); in Annotate()
247 model_->rule_classification_result()->Get(derivation.rule_id); in SuggestSelection()
283 if (model_->context_left_num_tokens() != kInvalidIndex) { in ClassifyText()
285 std::max(0, context_span.first - model_->context_left_num_tokens()); in ClassifyText()
287 if (model_->context_right_num_tokens() != kInvalidIndex) { in ClassifyText()
290 context_span.second + model_->context_right_num_tokens()); in ClassifyText()
303 model_->rule_classification_result()->Get(derivation.rule_id); in ClassifyText()
/external/libtextclassifier/native/lang_id/fb_model/
Dmodel-provider-from-fb.cc65 model_ = saft_fbs::GetVerifiedModelFromBytes(model_bytes); in Initialize()
66 if (model_ == nullptr) { in Initialize()
72 if (!saft_fbs::FillParameters(*model_, &context_)) { in Initialize()
101 saft_fbs::GetInputBytes(saft_fbs::GetInputByName(model_, kInputName)); in InitNetworkParams()
/external/grpc-grpc-java/services/src/generated/main/java/io/grpc/channelz/v1/
DSecurity.java59 subBuilder = ((io.grpc.channelz.v1.Security.Tls) model_).toBuilder(); in Security()
61 model_ = in Security()
64 subBuilder.mergeFrom((io.grpc.channelz.v1.Security.Tls) model_); in Security()
65 model_ = subBuilder.buildPartial(); in Security()
73 subBuilder = ((io.grpc.channelz.v1.Security.OtherSecurity) model_).toBuilder(); in Security()
75 model_ = in Security()
78 subBuilder.mergeFrom((io.grpc.channelz.v1.Security.OtherSecurity) model_); in Security()
79 model_ = subBuilder.buildPartial(); in Security()
1972 private java.lang.Object model_; field in Security
2021 return (io.grpc.channelz.v1.Security.Tls) model_; in getTls()
[all …]
/external/tensorflow/tensorflow/core/kernels/data/
Dmodel_dataset_op.cc129 model_ = std::make_shared<model::Model>(); in Iterator()
136 params.model = model_; in Initialize()
148 params.model = model_; in GetNextInternal()
177 params.model = model_; in RestoreInternal()
194 model_->OptimizeLoop(dataset()->algorithm_, cpu_budget_, in EnsureOptimizationLoopThreadStarted()
225 std::shared_ptr<model::Model> model_; member in tensorflow::data::ModelDatasetOp::Dataset::Iterator
/external/tensorflow/tensorflow/lite/tools/
Dverifier_test.cc587 auto model_ = Model::Pack(builder, scoped_model.get()); in TEST() local
589 ::tflite::FinishModelBuffer(builder, model_); in TEST()
611 auto model_ = Model::Pack(builder, scoped_model.get()); in TEST() local
613 ::tflite::FinishModelBuffer(builder, model_); in TEST()
636 auto model_ = Model::Pack(builder, scoped_model.get()); in TEST() local
638 ::tflite::FinishModelBuffer(builder, model_); in TEST()
660 auto model_ = Model::Pack(builder, scoped_model.get()); in TEST() local
662 ::tflite::FinishModelBuffer(builder, model_); in TEST()
686 auto model_ = Model::Pack(builder, scoped_model.get()); in TEST() local
688 ::tflite::FinishModelBuffer(builder, model_); in TEST()
[all …]
/external/tensorflow/tensorflow/lite/delegates/nnapi/
Dnnapi_delegate_device_selection_test.cc996 model_ = std::make_unique<LongIdentityModel>( in Init()
1004 model_ = std::make_unique<LongIdentityModel>( in Init()
1010 std::unique_ptr<LongIdentityModel> model_; member in tflite::__anonb1aa9a120111::DelegatePartitionLimitTest
1023 EXPECT_EQ(model_->CountNnApiPartitions(), 1); in TEST_F()
1032 EXPECT_EQ(model_->CountNnApiPartitions(), 2); in TEST_F()
1041 EXPECT_EQ(model_->CountNnApiPartitions(), 2); in TEST_F()
1050 EXPECT_EQ(model_->CountNnApiPartitions(), 2); in TEST_F()
1059 EXPECT_EQ(model_->CountNnApiPartitions(), 1); in TEST_F()
1060 EXPECT_EQ(model_->CountOpsExecutedByCpuKernel(), in TEST_F()
1073 EXPECT_EQ(model_->CountNnApiPartitions(), 2); in TEST_F()
[all …]
/external/libtextclassifier/native/annotator/vocab/
Dvocab-annotator-impl.cc36 model_(model) {} in VocabAnnotator()
124 ClassificationResult("dictionary", model_->target_classification_score(), in ClassifyTextInternal()
125 model_->priority_score()); in ClassifyTextInternal()

123