/external/tensorflow/tensorflow/lite/tools/optimize/ |
D | quantize_model_test.cc | 74 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 …]
|
D | quantize_weights_test.cc | 76 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/ |
D | actions-suggestions.cc | 120 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 …]
|
D | ngram-model.cc | 37 : 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/ |
D | remove_successive_transpose_test.cc | 32 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 …]
|
D | fuse_binary_into_following_affine_test.cc | 44 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 …]
|
D | fuse_binary_into_preceding_affine_test.cc | 44 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/ |
D | edgeset_test.cc | 35 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/ |
D | annotator.cc | 296 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/ |
D | tflite_engine.cc | 69 : 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/ |
D | signature_def_util_test.cc | 45 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/ |
D | embedding-network.cc | 289 : 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/ |
D | vendor_info.cc | 24 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/ |
D | pod-ner-impl_test.cc | 78 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/ |
D | model_builder.cc | 146 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()
|
D | model_builder.h | 129 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/ |
D | nnapi_plugin_test.cc | 72 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/ |
D | micro_interpreter.cc | 51 : 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/ |
D | grammar-annotator.cc | 83 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/ |
D | model-provider-from-fb.cc | 65 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/ |
D | Security.java | 59 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/ |
D | model_dataset_op.cc | 129 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/ |
D | verifier_test.cc | 587 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/ |
D | nnapi_delegate_device_selection_test.cc | 996 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/ |
D | vocab-annotator-impl.cc | 36 model_(model) {} in VocabAnnotator() 124 ClassificationResult("dictionary", model_->target_classification_score(), in ClassifyTextInternal() 125 model_->priority_score()); in ClassifyTextInternal()
|