/external/tensorflow/tensorflow/lite/tools/optimize/ |
D | quantization_wrapper_utils_custom_test.cc | 60 model->subgraphs[0]->tensors.push_back(std::move(tensor)); in TEST() 74 EXPECT_EQ(model->subgraphs[0]->tensors.size(), 33); in TEST() 79 EXPECT_EQ(model->subgraphs[0]->tensors[0]->name, "lstm_tensor0"); in TEST() 80 EXPECT_EQ(model->subgraphs[0]->tensors[21]->name, "intermediate_0_0"); in TEST() 81 EXPECT_EQ(model->subgraphs[0]->tensors[22]->name, "intermediate_0_1"); in TEST() 82 EXPECT_EQ(model->subgraphs[0]->tensors[23]->name, "intermediate_0_2"); in TEST() 83 EXPECT_EQ(model->subgraphs[0]->tensors[24]->name, "intermediate_0_3"); in TEST() 84 EXPECT_EQ(model->subgraphs[0]->tensors[25]->name, "intermediate_0_4"); in TEST() 85 EXPECT_EQ(model->subgraphs[0]->tensors[26]->name, "intermediate_0_5"); in TEST() 86 EXPECT_EQ(model->subgraphs[0]->tensors[27]->name, "intermediate_0_6"); in TEST() [all …]
|
D | quantize_model_test.cc | 98 ASSERT_EQ(graph->tensors.size(), expected_graph->tensors.size()); in ExpectSameModels() 99 for (size_t i = 0; i < graph->tensors.size(); i++) { in ExpectSameModels() 100 const auto tensor = graph->tensors[i].get(); in ExpectSameModels() 101 const auto expected_tensor = expected_graph->tensors[i].get(); in ExpectSameModels() 171 ASSERT_EQ(quantized_graph->tensors.size(), float_graph->tensors()->size()); in TEST_P() 172 for (size_t i = 0; i < quantized_graph->tensors.size(); i++) { in TEST_P() 173 const auto quant_tensor = quantized_graph->tensors[i].get(); in TEST_P() 174 const auto float_tensor = float_graph->tensors()->Get(i); in TEST_P() 194 ASSERT_EQ(quantized_graph->tensors.size(), float_graph->tensors()->size()); in TEST_P() 195 for (size_t i = 0; i < quantized_graph->tensors.size(); i++) { in TEST_P() [all …]
|
D | quantization_wrapper_utils_test.cc | 61 model->subgraphs[0]->tensors.push_back(std::move(tensor)); in TEST() 75 EXPECT_EQ(model->subgraphs[0]->tensors.size(), 26); in TEST() 80 EXPECT_EQ(model->subgraphs[0]->tensors[0]->name, "lstm_tensor0"); in TEST() 81 EXPECT_EQ(model->subgraphs[0]->tensors[21]->name, "intermediate_0_0"); in TEST() 82 EXPECT_EQ(model->subgraphs[0]->tensors[22]->name, "intermediate_0_1"); in TEST() 83 EXPECT_EQ(model->subgraphs[0]->tensors[23]->name, "intermediate_0_2"); in TEST() 84 EXPECT_EQ(model->subgraphs[0]->tensors[24]->name, "intermediate_0_3"); in TEST() 85 EXPECT_EQ(model->subgraphs[0]->tensors[25]->name, "intermediate_0_4"); in TEST() 102 EXPECT_EQ(model->subgraphs[0]->tensors.size(), 26); in TEST() 107 EXPECT_EQ(model->subgraphs[0]->tensors[0]->name, "lstm_tensor0"); in TEST() [all …]
|
/external/tensorflow/tensorflow/core/common_runtime/ |
D | all_to_all_test.cc | 38 std::vector<Tensor> tensors = { in TEST_F() local 45 SchedClosure([this, &tensors, i, &counter]() { in TEST_F() 48 tensors[i].shape()); in TEST_F() 53 &tensors[i], &tensors[i])); in TEST_F() 58 test::ExpectTensorEqual<double>(tensors[0], in TEST_F() 60 test::ExpectTensorEqual<double>(tensors[1], in TEST_F() 62 test::ExpectTensorEqual<double>(tensors[2], in TEST_F() 69 std::vector<Tensor> tensors = { in TEST_F() local 77 SchedClosure([this, &tensors, &device_ranks, i, &counter]() { in TEST_F() 80 tensors[i].shape(), device_ranks); in TEST_F() [all …]
|
/external/tensorflow/tensorflow/python/autograph/utils/ |
D | tensors_test.py | 17 from tensorflow.python.autograph.utils import tensors 39 self.assertTrue(tensors.is_tensor_array(self._simple_tensor_array())) 40 self.assertFalse(tensors.is_tensor_array(self._simple_tensor_list())) 41 self.assertFalse(tensors.is_tensor_array(constant_op.constant(1))) 42 self.assertFalse(tensors.is_tensor_array(self._simple_list_of_tensors())) 43 self.assertFalse(tensors.is_tensor_array(None)) 46 self.assertFalse(tensors.is_tensor_list(self._simple_tensor_array())) 47 self.assertTrue(tensors.is_tensor_list(self._simple_tensor_list())) 48 self.assertFalse(tensors.is_tensor_list(constant_op.constant(1))) 49 self.assertFalse(tensors.is_tensor_list(self._simple_list_of_tensors())) [all …]
|
/external/tensorflow/tensorflow/python/ops/ |
D | nccl_ops.py | 29 def all_sum(tensors): argument 43 return _apply_all_reduce('sum', tensors) 76 def all_prod(tensors): argument 90 return _apply_all_reduce('prod', tensors) 93 def all_min(tensors): argument 107 return _apply_all_reduce('min', tensors) 110 def all_max(tensors): argument 124 return _apply_all_reduce('max', tensors) 127 def reduce_sum(tensors): argument 143 return _apply_reduce('sum', tensors) [all …]
|
D | nccl_ops_test.py | 29 def _DeviceTensors(tensors, devices): argument 31 for t, d in zip(tensors, devices): 37 def _NcclAllReduce(nccl_fun, tensors, devices): argument 38 return nccl_fun(_DeviceTensors(tensors, devices)) 41 def _NcclReduce(nccl_fun, tensors, devices): argument 44 return [nccl_fun(_DeviceTensors(tensors, devices))] 47 def _NcclBroadcast(tensors, devices): argument 50 tensor = array_ops.identity(tensors[0]) 80 tensors = [] 82 tensors.append(random.astype(dtype)) [all …]
|
/external/tensorflow/tensorflow/compiler/mlir/lite/quantization/lite/ |
D | quantize_model_test.cc | 189 return expected_graph.tensors[expected_op->inputs[idx]].get(); in FindMatchingExpectedTensor() 206 const auto& tensor = graph->tensors[op->inputs[idx]]; in ExpectSameModels() 236 auto* input = subgraph->tensors[subgraph->inputs[0]].get(); in QuantizeConvModelTest() 237 auto* output = subgraph->tensors[subgraph->outputs[0]].get(); in QuantizeConvModelTest() 295 for (const auto& tensor : subgraph->tensors) { in TEST_P() 356 EXPECT_EQ(subgraph->tensors.size(), 5); in TEST_F() 358 EXPECT_EQ(subgraph->tensors[input_idx]->type, TensorType_INT8); in TEST_F() 359 EXPECT_EQ(subgraph->tensors[input_idx]->name, "input"); in TEST_F() 360 EXPECT_EQ(subgraph->tensors[input_idx]->quantization->scale.size(), 1); in TEST_F() 361 EXPECT_EQ(subgraph->tensors[input_idx]->quantization->zero_point.size(), 1); in TEST_F() [all …]
|
/external/ComputeLibrary/src/dynamic_fusion/sketch/gpu/ |
D | GpuOperatorGroup.cpp | 36 …d::vector<DependencyGraph::TensorId> get_tensor_ids(const std::vector<const ITensorInfo *> tensors) in get_tensor_ids() argument 40 std::begin(tensors), std::end(tensors), in get_tensor_ids() 51 …r::Operator(OperatorId id, GpuOperatorType operator_type, const ArgumentPack<ITensorInfo> &tensors) in Operator() argument 52 : _id{ id }, _operator_type{ operator_type }, _tensors{ tensors } in Operator() 66 ArgumentPack<ITensorInfo> Operator::tensors() const in tensors() function in arm_compute::experimental::dynamic_fusion::Operator 73 const auto src_tensor_ids = get_tensor_ids(op.tensors().get_const_src_tensors()); in try_add_operator() 74 const auto dst_tensor_ids = get_tensor_ids(op.tensors().get_const_dst_tensors()); in try_add_operator() 96 …if(op.operator_type() != GpuOperatorType::Unfusable && op.tensors().get_const_dst_tensors().size()… in try_add_operator() 103 const auto root_dst_tensors = get_root_operator()->tensors().get_const_dst_tensors(); in try_add_operator() 106 const auto dst_tensors = op.tensors().get_const_dst_tensors(); in try_add_operator() [all …]
|
/external/tensorflow/tensorflow/core/kernels/ |
D | tensor_list_util.cc | 51 if (a.tensors().size() != b.tensors().size()) { in TensorListBinaryAdd() 54 a.tensors().size(), " and the other is ", b.tensors().size()); in TensorListBinaryAdd() 56 out->tensors().reserve(a.tensors().size()); in TensorListBinaryAdd() 57 for (int i = 0; i < a.tensors().size(); ++i) { in TensorListBinaryAdd() 58 const Tensor& a_tensor = a.tensors()[i]; in TensorListBinaryAdd() 59 const Tensor& b_tensor = b.tensors()[i]; in TensorListBinaryAdd() 62 out->tensors().push_back(out_tensor); in TensorListBinaryAdd() 74 y->tensors().reserve(x.tensors().size()); in TensorListZerosLike() 75 for (const Tensor& t : x.tensors()) { in TensorListZerosLike() 78 y->tensors().emplace_back(out_tensor); in TensorListZerosLike()
|
D | map_kernels.h | 103 result->scalar<int32>()() = map->tensors().size(); in Compute() 118 ctx, map->tensors().find(key) != map->tensors().end(), in Compute() 123 ctx->set_output(0, map->tensors().find(key)->second); in Compute() 155 ctx, map->tensors().find(key) != map->tensors().end(), in Compute() 163 output_map->tensors().erase(key); in Compute() 178 result->scalar<bool>()() = map->tensors().find(key) != map->tensors().end(); in Compute() 197 auto it = map->tensors().begin(); in Compute() 199 output_shape.InsertDim(0, map->tensors().size()); in Compute() 204 size_t sz = map->tensors().size(); in Compute() 206 while (it != map->tensors().end() && i < sz) { in Compute() [all …]
|
/external/armnn/src/armnnTfLiteParser/test/ |
D | GetInputsOutputs.cpp | 23 "tensors": [ in GetInputsOutputsMainFixture() 73 "tensors": [ in GetInputsOutputsMainFixture() 156 TfLiteParserImpl::TensorRawPtrVector tensors = TfLiteParserImpl::GetInputs(model, 0, 0); variable 157 CHECK_EQ(0, tensors.size()); 164 TfLiteParserImpl::TensorRawPtrVector tensors = TfLiteParserImpl::GetOutputs(model, 0, 0); variable 165 CHECK_EQ(0, tensors.size()); 172 TfLiteParserImpl::TensorRawPtrVector tensors = TfLiteParserImpl::GetInputs(model, 0, 0); variable 173 CHECK_EQ(1, tensors.size()); 174 CheckTensors(tensors[0], 4, { 1, 2, 2, 1 }, tflite::TensorType::TensorType_UINT8, 1, 182 TfLiteParserImpl::TensorRawPtrVector tensors = TfLiteParserImpl::GetOutputs(model, 0, 0); variable [all …]
|
/external/armnn/delegate/test/ |
D | UnidirectionalSequenceLstmTestHelper.hpp | 108 std::vector<flatbuffers::Offset<Tensor>> tensors; in CreateUnidirectionalSequenceLstmTfLiteModel() local 126 tensors.push_back(CreateTensor(flatBufferBuilder, in CreateUnidirectionalSequenceLstmTfLiteModel() 132 operatorInputs.push_back(tensors.size() - 1); in CreateUnidirectionalSequenceLstmTfLiteModel() 141 tensors.push_back(CreateTensor(flatBufferBuilder, in CreateUnidirectionalSequenceLstmTfLiteModel() 148 operatorInputs.push_back(tensors.size() - 1); in CreateUnidirectionalSequenceLstmTfLiteModel() 160 tensors.push_back(CreateTensor(flatBufferBuilder, in CreateUnidirectionalSequenceLstmTfLiteModel() 167 operatorInputs.push_back(tensors.size() - 1); in CreateUnidirectionalSequenceLstmTfLiteModel() 174 tensors.push_back(CreateTensor(flatBufferBuilder, in CreateUnidirectionalSequenceLstmTfLiteModel() 181 operatorInputs.push_back(tensors.size() - 1); in CreateUnidirectionalSequenceLstmTfLiteModel() 188 tensors.push_back(CreateTensor(flatBufferBuilder, in CreateUnidirectionalSequenceLstmTfLiteModel() [all …]
|
/external/ComputeLibrary/src/cpu/operators/ |
D | CpuDepthwiseConv2d.cpp | 147 void CpuDepthwiseConv2d::CpuDepthwiseConv2dOptimizedInternal::run(ITensorPack &tensors) in run() argument 149 ARM_COMPUTE_ERROR_ON_MSG(tensors.empty(), "No inputs provided"); in run() 150 prepare(tensors); in run() 152 auto bias = tensors.get_const_tensor(TensorType::ACL_SRC_2); in run() 153 auto dst = tensors.get_tensor(TensorType::ACL_DST_0); in run() 154 auto workspace = tensors.get_tensor(TensorType::ACL_INT_3); in run() 155 auto packed_weights = tensors.get_tensor(TensorType::ACL_INT_4); in run() 161 auto src = tensors.get_const_tensor(TensorType::ACL_SRC_0); in run() 162 auto src_perm = tensors.get_tensor(TensorType::ACL_INT_0); in run() 171 auto src_perm = tensors.get_tensor(TensorType::ACL_INT_0); in run() [all …]
|
/external/armnn/src/armnnOnnxParser/test/ |
D | GetInputsOutputs.cpp | 71 std::vector<std::string> tensors = armnnOnnxParser::OnnxParserImpl::GetInputs(model); variable 72 CHECK_EQ(1, tensors.size()); 73 CHECK_EQ("Input", tensors[0]); 80 std::vector<std::string> tensors = armnnOnnxParser::OnnxParserImpl::GetOutputs(model); variable 81 CHECK_EQ(1, tensors.size()); 82 CHECK_EQ("Output", tensors[0]); 142 std::vector<std::string> tensors = armnnOnnxParser::OnnxParserImpl::GetInputs(model); variable 143 CHECK_EQ(0, tensors.size()); 246 std::vector<std::string> tensors = armnnOnnxParser::OnnxParserImpl::GetInputs(model); variable 247 CHECK_EQ(2, tensors.size()); [all …]
|
/external/tensorflow/tensorflow/lite/tools/versioning/ |
D | op_signature.cc | 39 return subgraph->tensors()->Get(op->inputs()->Get(idx))->shape()->size(); in GetNumDims() 43 const flatbuffers::Vector<int32_t>* tensors, const SubGraph* subgraph, in GetOpSignatureTensorSpecs() argument 48 for (int32_t i = 0; i < tensors->Length(); ++i) { in GetOpSignatureTensorSpecs() 49 int32_t tensor_no = tensors->Get(i); in GetOpSignatureTensorSpecs() 53 if (subgraph->tensors() && tensor_no < subgraph->tensors()->Length()) { in GetOpSignatureTensorSpecs() 54 auto* fb_tensor = subgraph->tensors()->Get(tensor_no); in GetOpSignatureTensorSpecs() 66 subgraph->tensors()->Get(tensor_no)->shape(); in GetOpSignatureTensorSpecs() 73 subgraph->tensors()->Get(tensor_no)->shape_signature(); in GetOpSignatureTensorSpecs() 91 TfLiteIntArray* tensors, const TfLiteContext* context, in GetOpSignatureTensorSpecs() argument 95 for (int32_t i = 0; i < tensors->size; ++i) { in GetOpSignatureTensorSpecs() [all …]
|
/external/tensorflow/tensorflow/lite/delegates/xnnpack/ |
D | transpose_conv_tester.cc | 128 std::vector<flatbuffers::Offset<Tensor>> tensors; in CreateTfLiteModel() local 143 const int tensor_index_output_shape = tensors.size(); in CreateTfLiteModel() 144 tensors.emplace_back( in CreateTfLiteModel() 167 const int tensor_index_float16_filter = tensors.size(); in CreateTfLiteModel() 168 tensors.emplace_back(CreateTensorDirect(builder, &filter_shape, in CreateTfLiteModel() 184 tensor_index_float16_bias = tensors.size(); in CreateTfLiteModel() 185 tensors.emplace_back(CreateTensorDirect(builder, &bias_shape, in CreateTfLiteModel() 190 const int tensor_index_filter = tensors.size(); in CreateTfLiteModel() 191 tensors.emplace_back(CreateTensorDirect( in CreateTfLiteModel() 201 assert(tensor_index_filter + 1 == tensors.size()); in CreateTfLiteModel() [all …]
|
D | xnnpack_delegate.cc | 294 std::vector<int> tensors(context->tensors_size, -1); in Create() local 331 tensors[t] = t; in Create() 339 tensors[t] = t; in Create() 347 tensors[t] = t; in Create() 360 tensors[t] = t; in Create() 367 tensors[t] = t; in Create() 372 tensors.erase(std::remove_if(tensors.begin(), tensors.end(), in Create() 374 tensors.end()); in Create() 375 std::sort(tensors.begin(), tensors.end()); in Create() 378 std::vector<uint32_t> xnnpack_tensors(tensors.back() + 1); in Create() [all …]
|
/external/libtextclassifier/native/utils/tflite/ |
D | token_encoder.cc | 61 &context->tensors[node->outputs->data[kOutputPosition]], context)); in ResizeOutputTensors() 69 &context->tensors[node->outputs->data[kOutputAttr + i]], context)); in ResizeOutputTensors() 77 context->tensors[node->inputs->data[kInputNumTokens]]; in Prepare() 82 context->tensors[node->outputs->data[kOutputLengths]]; in Prepare() 84 context->tensors[node->outputs->data[kOutputPosition]]; in Prepare() 96 TfLiteTensor& input = context->tensors[node->inputs->data[kInputAttr + i]]; in Prepare() 98 context->tensors[node->outputs->data[kOutputAttr + i]]; in Prepare() 103 context->tensors[node->inputs->data[kInputMaxLength]]; in Prepare() 111 context->tensors[node->outputs->data[kOutputAttr + i]]; in Prepare() 121 context->tensors[node->inputs->data[kInputNumTokens]]; in Eval() [all …]
|
D | text_encoder3s.cc | 63 context->tensors[node->outputs->data[kOutputEncodedInd]]; in ResizeOutputTensors() 70 context->tensors[node->outputs->data[kOutputPositionInd]]; in ResizeOutputTensors() 80 context->tensors[node->outputs->data[kOutputAttrInd + i]]; in ResizeOutputTensors() 93 context->tensors[node->inputs->data[kInputTextInd]]; in Prepare() 98 context->tensors[node->outputs->data[kOutputLengthsInd]]; in Prepare() 101 context->tensors[node->outputs->data[kOutputEncodedInd]]; in Prepare() 103 context->tensors[node->outputs->data[kOutputPositionInd]]; in Prepare() 120 context->tensors[node->inputs->data[kInputAttrInd + i]]; in Prepare() 122 context->tensors[node->outputs->data[kOutputAttrInd + i]]; in Prepare() 127 context->tensors[node->inputs->data[kMaxLengthInd]]; in Prepare() [all …]
|
D | text_encoder.cc | 142 &context->tensors[node->outputs->data[kOutputEncoded]], in ResizeOutputTensors() 149 &context->tensors[node->outputs->data[kOutputPosition]], context)); in ResizeOutputTensors() 157 &context->tensors[node->outputs->data[kOutputAttr + i]], context)); in ResizeOutputTensors() 165 context->tensors[node->inputs->data[kInputTexts]]; in Prepare() 170 context->tensors[node->outputs->data[kOutputLengths]]; in Prepare() 172 context->tensors[node->outputs->data[kOutputEncoded]]; in Prepare() 174 context->tensors[node->outputs->data[kOutputPosition]]; in Prepare() 186 TfLiteTensor& input = context->tensors[node->inputs->data[kInputAttr + i]]; in Prepare() 188 context->tensors[node->outputs->data[kOutputAttr + i]]; in Prepare() 193 context->tensors[node->inputs->data[kInputMaxLength]]; in Prepare() [all …]
|
/external/tensorflow/tensorflow/python/data/util/ |
D | sparse.py | 74 def deserialize_sparse_tensors(tensors, types, shapes, classes): argument 91 nest.flatten(tensors), nest.flatten(types), nest.flatten(shapes), 97 def get_classes(tensors): argument 108 return nest.pack_sequence_as(tensors, [ 111 for tensor in nest.flatten(tensors) 115 def serialize_many_sparse_tensors(tensors): argument 125 ret = nest.pack_sequence_as(tensors, [ 128 for tensor in nest.flatten(tensors) 133 def serialize_sparse_tensors(tensors): argument 143 ret = nest.pack_sequence_as(tensors, [ [all …]
|
/external/tensorflow/tensorflow/core/grappler/optimizers/ |
D | pin_to_host_optimizer_test.cc | 66 auto tensors = EvaluateNodes(item.graph, item.fetch); in TEST_F() local 67 EXPECT_EQ(tensors_expected.size(), tensors.size()); in TEST_F() 68 for (int i = 0; i < tensors.size(); ++i) { in TEST_F() 70 test::ExpectTensorEqual<int32>(tensors[i], tensors_expected[i]); in TEST_F() 72 test::ExpectTensorEqual<tstring>(tensors[i], tensors_expected[i]); in TEST_F() 106 auto tensors = EvaluateNodes(item.graph, item.fetch); in TEST_F() local 107 EXPECT_EQ(tensors_expected.size(), tensors.size()); in TEST_F() 108 for (int i = 0; i < tensors.size(); ++i) { in TEST_F() 109 test::ExpectTensorEqual<float>(tensors[i], tensors_expected[i]); in TEST_F() 146 auto tensors = EvaluateNodes(item.graph, item.fetch); in TEST_F() local [all …]
|
/external/tensorflow/tensorflow/core/api_def/base_api/ |
D | api_def_SaveV2.pbtxt | 7 write the tensors. 13 shape {N}. The names of the tensors to be saved. 19 shape {N}. The slice specs of the tensors to be saved. 20 Empty strings indicate that they are non-partitioned tensors. 24 name: "tensors" 26 `N` tensors to save. 29 summary: "Saves tensors in V2 checkpoint format." 31 By default, saves the named tensors in full. If the caller wishes to save 32 specific slices of full tensors, "shape_and_slices" should be non-empty strings
|
/external/tensorflow/tensorflow/python/framework/ |
D | subscribe.py | 26 def _recursive_apply(tensors, apply_fn): argument 44 tensors_type = type(tensors) 46 return apply_fn(tensors) 47 elif isinstance(tensors, variables.Variable): 48 return apply_fn(tensors.value()) 49 elif isinstance(tensors, (list, tuple)): 50 tensors = [_recursive_apply(t, apply_fn) for t in tensors] 52 return list(tensors) 54 return tuple(tensors) 55 return tensors_type(*tensors) # collections.namedtuple [all …]
|