Home
last modified time | relevance | path

Searched refs:input_index (Results 1 – 25 of 134) sorted by relevance

123456

/external/tensorflow/tensorflow/lite/toco/graph_transformations/
Dpropagate_fake_quant_num_bits.cc124 bool DoesOpInputBlockBackwardPropagation(const Operator& op, int input_index) { in DoesOpInputBlockBackwardPropagation() argument
127 return input_index == 0; in DoesOpInputBlockBackwardPropagation()
130 return input_index != 0; in DoesOpInputBlockBackwardPropagation()
135 return input_index != 0; in DoesOpInputBlockBackwardPropagation()
138 return input_index != 0; in DoesOpInputBlockBackwardPropagation()
152 for (size_t input_index = 0; input_index < op->inputs.size(); ++input_index) { in RecursivelyBackwardPropagateDataType() local
153 const auto& input = op->inputs[input_index]; in RecursivelyBackwardPropagateDataType()
157 if (DoesOpInputBlockBackwardPropagation(*op, input_index)) { in RecursivelyBackwardPropagateDataType()
Dquantize.cc226 std::size_t input_index, ArrayDataType* quantized_data_type, in ChooseQuantizationForOperatorInput() argument
228 const auto& input = op.inputs[input_index]; in ChooseQuantizationForOperatorInput()
241 if (input_index == 2) { in ChooseQuantizationForOperatorInput()
248 if (input_index == 3) { in ChooseQuantizationForOperatorInput()
255 if (input_index == LstmCellOperator::BIASES_INPUT) { in ChooseQuantizationForOperatorInput()
290 if (input_index == LstmCellOperator::PREV_STATE_INPUT) { in ChooseQuantizationForOperatorInput()
573 for (std::size_t input_index = 0; input_index < op.inputs.size(); in Run() local
574 input_index++) { in Run()
577 if (ChooseQuantizationForOperatorInput(this, model, op, input_index, in Run()
580 const auto& input = op.inputs[input_index]; in Run()
[all …]
Dremove_trivial_passthrough.cc72 int input_index) { in RemoveTrivialPassthroughOp() argument
79 if (input_index != -1) { in RemoveTrivialPassthroughOp()
80 main_input_array_index = input_index; in RemoveTrivialPassthroughOp()
/external/libtextclassifier/native/utils/
Dtflite-model-executor.h79 void SetInput(const int input_index, const TensorView<T>& input_data, in SetInput() argument
81 input_data.copy_to(interpreter->typed_input_tensor<T>(input_index), in SetInput()
86 void SetInput(const int input_index, const std::vector<T>& input_data, in SetInput() argument
89 interpreter->typed_input_tensor<T>(input_index)); in SetInput()
93 void SetInput(const int input_index, const T input_value, in SetInput() argument
96 interpreter->tensor(interpreter->inputs()[input_index]); in SetInput()
154 void TfLiteModelExecutor::SetInput(const int input_index,
/external/tensorflow/tensorflow/lite/testing/
Dparse_testdata.cc134 for (int input_index = 0; input_index < inputs; input_index++) { in ParseExamples() local
142 for (int input_index = 0; input_index < outputs; input_index++) { in ParseExamples() local
155 int input_index = interpreter->inputs()[i]; in FeedExample() local
158 interpreter->ResizeInputTensor(input_index, example.inputs[i].shape)); in FeedExample()
163 int input_index = interpreter->inputs()[i]; in FeedExample() local
164 if (float* data = interpreter->typed_tensor<float>(input_index)) { in FeedExample()
169 interpreter->typed_tensor<int32_t>(input_index)) { in FeedExample()
174 interpreter->typed_tensor<int64_t>(input_index)) { in FeedExample()
/external/tensorflow/tensorflow/lite/testing/nnapi_tflite_zip_tests/
Dparse_testdata.cc137 for (int input_index = 0; input_index < inputs; input_index++) { in ParseExamples() local
145 for (int input_index = 0; input_index < outputs; input_index++) { in ParseExamples() local
158 int input_index = interpreter->inputs()[i]; in FeedExample() local
161 interpreter->ResizeInputTensor(input_index, example.inputs[i].shape)); in FeedExample()
166 int input_index = interpreter->inputs()[i]; in FeedExample() local
167 if (float* data = interpreter->typed_tensor<float>(input_index)) { in FeedExample()
172 interpreter->typed_tensor<int32_t>(input_index)) { in FeedExample()
177 interpreter->typed_tensor<int64_t>(input_index)) { in FeedExample()
/external/tensorflow/tensorflow/core/kernels/image/
Dmirror_pad_op.h169 const Index input_index = ToInputIndex(index);
170 return impl_.coeff(input_index);
212 const Index input_index = ToInputIndex(index);
216 return impl_.template packet<Unaligned>(input_index);
228 return impl_.template packet<Unaligned>(input_index);
234 values[0] = impl_.coeff(input_index);
301 Index input_index = 0;
303 input_index += ToInputCoord(coords[dim], dim) * input_strides_[dim];
305 return input_index;
309 Index input_index = 0;
[all …]
Dscale_and_translate_op.cc138 int input_index = starts_vec(output_index); in ComputeGradSpansCore() local
139 for (int j = 0; j < spans.span_size; ++j, ++input_index) { in ComputeGradSpansCore()
141 if (weight != 0.0f && input_index < forward_input_size) { in ComputeGradSpansCore()
142 grad_components[input_index].push_back( in ComputeGradSpansCore()
170 for (int input_index = 0; input_index < forward_input_size; ++input_index) { in ComputeGradSpansCore() local
171 if (!grad_components[input_index].empty()) { in ComputeGradSpansCore()
172 const int start_span = grad_components[input_index].front().index; in ComputeGradSpansCore()
173 grad_starts_vec(input_index) = start_span; in ComputeGradSpansCore()
174 for (const GradComponent& gc : grad_components[input_index]) { in ComputeGradSpansCore()
175 grad_weights_vec(input_index * grad_spans->span_size + gc.index - in ComputeGradSpansCore()
[all …]
/external/tensorflow/tensorflow/compiler/tf2xla/
Dtf2xla.cc116 updated_inputs[update.input_index] = true; in ConvertGraphToXla()
118 int64 input_index = xla_args.size() - config.variable_size(); in ConvertGraphToXla() local
120 if (variable.readonly() == updated_inputs[input_index]) { in ConvertGraphToXla()
124 updated_inputs[input_index] ? "" : "not ", in ConvertGraphToXla()
127 ++input_index; in ConvertGraphToXla()
/external/tensorflow/tensorflow/python/keras/engine/
Dinput_spec.py208 for input_index, (x, spec) in enumerate(zip(inputs, input_spec)):
219 raise ValueError('Input ' + str(input_index) + ' of layer ' +
227 raise ValueError('Input ' + str(input_index) + ' of layer ' +
234 raise ValueError('Input ' + str(input_index) + ' of layer ' +
243 raise ValueError('Input ' + str(input_index) + ' of layer ' +
256 'Input ' + str(input_index) + ' of layer ' + layer_name + ' is'
271 raise ValueError('Input ' + str(input_index) +
/external/tensorflow/tensorflow/core/kernels/
Dops_testutil.cc185 const Tensor& OpsTestBase::GetInput(int input_index) const { in GetInput()
186 CHECK_LT(input_index, context_->num_inputs()); in GetInput()
187 CHECK(!IsRefType(context_->input_dtype(input_index))); in GetInput()
188 return context_->input(input_index); in GetInput()
191 TensorValue OpsTestBase::mutable_input(int input_index) { in mutable_input() argument
192 CHECK_LT(input_index, inputs_.size()); in mutable_input()
193 return inputs_[input_index]; in mutable_input()
Ddynamic_stitch_op_gpu.cu.cc42 const int32 input_index = data_indices[slice_id]; in DynamicStitchKernel() local
43 if (input_index != -1) { in DynamicStitchKernel()
44 output[output_index] = ldg(data_ptrs[input_index] + slice_offset); in DynamicStitchKernel()
Dquantized_batch_norm_op.cc55 const int input_index = (row_index * depth) + channel; in ReferenceBatchNorm() local
57 QuantizedToFloat(input_flat(input_index), input_min, input_max); in ReferenceBatchNorm()
81 output_flat(input_index) = in ReferenceBatchNorm()
148 const int input_index = (row_index * depth) + channel; in FixedPointBatchNorm() local
150 RequantizeInNewRange<T1, T2>(input_flat(input_index), input_min, in FixedPointBatchNorm()
156 output_flat(input_index) = output_value; in FixedPointBatchNorm()
/external/tensorflow/tensorflow/lite/delegates/gpu/common/
Dquantization_util.cc33 TfLiteContext* context, int input_index, in DequantizeInput() argument
35 if (quant_conversion_map.find(input_index) == quant_conversion_map.end()) { in DequantizeInput()
38 int original_tensor_idx = quant_conversion_map.at(input_index); in DequantizeInput()
39 const TfLiteTensor& dequantized_tflite_tensor = context->tensors[input_index]; in DequantizeInput()
/external/tensorflow/tensorflow/python/framework/
Dauto_control_deps_utils.py42 for input_index, t in enumerate(func_graph.inputs):
59 result.append(input_index)
146 input_index = _input_index(op, handle)
152 return input_index not in read_only_input_indices
/external/tensorflow/tensorflow/compiler/xla/service/
Doptimize_input_output_buffer_alias.cc74 const ShapeIndex& input_index = entry.index; in Build() local
76 if (!alias_config->ParameterHasAlias(0, input_index) && in Build()
79 alias_config->SetUpAlias(output_index, 0, input_index)); in Build()
/external/tensorflow/tensorflow/compiler/tf2tensorrt/
Dtensorrt_test.cc105 const int input_index = engine.getBindingIndex(kInputTensor); in Execute() local
110 ASSERT_EQ(0, cudaMalloc(&buffers[input_index], sizeof(float))); in Execute()
120 ASSERT_EQ(0, cudaMemcpyAsync(buffers[input_index], input, sizeof(float), in Execute()
129 ASSERT_EQ(0, cudaFree(buffers[input_index])); in Execute()
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dcase_op.cc174 ctx->GetResourceInput(update.input_index + 1, &resource)); in Compile()
175 XlaCompiler::Argument& arg = arguments[update.input_index]; in Compile()
272 bool equal = lhs.input_index == rhs.input_index && in Compile()
354 ctx->GetResourceInput(update.input_index + 1, &resource)); in Compile()
359 arguments[update.input_index].tensor_array_gradients, in Compile()
362 VLOG(2) << "Case variable: pos: " << update.input_index in Compile()
Dif_op.cc62 ctx->GetResourceInput(update.input_index + 1, &resource)); in PopulateTensorArrayGradients()
63 XlaCompiler::Argument& arg = arguments[update.input_index]; in PopulateTensorArrayGradients()
155 bool equal = lhs.input_index == rhs.input_index && lhs.shape == rhs.shape && in ValidateShapes()
339 ctx->GetResourceInput(update.input_index + 1, &resource)); in Compile()
344 arguments[update.input_index].tensor_array_gradients, in Compile()
347 VLOG(2) << "If variable: pos: " << update.input_index in Compile()
/external/tensorflow/tensorflow/lite/tools/optimize/
Dmodify_model_interface.cc40 int32_t input_index; // index of the input tensor. member
204 TensorT* float_tensor = subgraph->tensors[tot.input_index].get(); in SetInputTypeToUINT8()
228 TensorT* quant_tensor = subgraph->tensors[tot.input_index].get(); in SetOutputTypeToUINT8()
253 TFLITE_DCHECK(tot.input_index < last_tensor_index); in RemoveInputTensor()
255 last_tensor_index = tot.input_index; in RemoveInputTensor()
261 TFLITE_DCHECK(tot.input_index < subgraph->tensors.size()); in RemoveInputTensor()
263 if (tot.input_index >= original_number_tensors) { in RemoveInputTensor()
264 subgraph->tensors.erase(subgraph->tensors.begin() + tot.input_index); in RemoveInputTensor()
293 subgraph->outputs[tot.model_index] = tot.input_index; in RemoveOutputTensor()
/external/tensorflow/tensorflow/c/eager/
Dgradient_checker.cc93 int input_index, bool use_function, in CalcNumericalGrad() argument
101 theta_inputs[input_index]; // parameter we are grad checking in CalcNumericalGrad()
165 theta_inputs[input_index] = thetaPlus.get(); in CalcNumericalGrad()
171 theta_inputs[input_index] = thetaMinus.get(); in CalcNumericalGrad()
/external/tensorflow/tensorflow/c/eager/parallel_device/
Dparallel_device_lib.cc238 for (int input_index = 0; input_index < inputs.size(); ++input_index) { in Execute() local
239 TFE_OpAddInput(op_.get(), inputs[input_index], status); in Execute()
329 for (int input_index = 0; input_index < inputs.size(); ++input_index) { in StartExecute() local
331 device_inputs.push_back(inputs[input_index]->tensor(device_index)); in StartExecute()
/external/tensorflow/tensorflow/compiler/xrt/kernels/
Dxrt_state_ops.h90 int input_index = tuple_node.input_index(); in ParseTupleNode() local
91 if (input_index < 0 || input_index >= input_vector->size()) { in ParseTupleNode()
93 input_index, ": MakeTuple has ", in ParseTupleNode()
98 input_vector->at(input_index); in ParseTupleNode()
102 "Invalid tuple tree: input index ", input_index, in ParseTupleNode()
108 TensorShapeUtils::IsScalar(input_tensor_list[input_index].shape())); in ParseTupleNode()
109 int64 key = input_tensor_list[input_index].scalar<int64>()(); in ParseTupleNode()
152 int input_index = tuple_node->input_index(); in ParseTupleTree()
153 *element = input_vector->at(input_index); in ParseTupleTree()
/external/tensorflow/tensorflow/core/framework/
Dop_kernel.cc456 void OpKernelContext::forward_ref_input_to_ref_output(int input_index, in forward_ref_input_to_ref_output() argument
458 CHECK_GE(input_index, 0); in forward_ref_input_to_ref_output()
459 CHECK_LT(input_index, num_inputs()); in forward_ref_input_to_ref_output()
460 CHECK(input_is_ref(input_index)); in forward_ref_input_to_ref_output()
461 set_output_ref(output_index, (*params_->inputs)[input_index].mutex_if_ref, in forward_ref_input_to_ref_output()
462 (*params_->inputs)[input_index].tensor); in forward_ref_input_to_ref_output()
466 int input_index, int output_index, const TensorShape& output_shape, in forward_input_to_output_with_shape() argument
472 input_index, output_index, expected_output_dtype(output_index), in forward_input_to_output_with_shape()
487 int input_index, output_index; in forward_input_to_output_with_shape() local
488 TF_RETURN_IF_ERROR(get_input_index(input_name, &input_index)); in forward_input_to_output_with_shape()
[all …]
/external/tensorflow/tensorflow/lite/c/
Dc_api.cc150 const TfLiteInterpreter* interpreter, int32_t input_index) { in TfLiteInterpreterGetInputTensor() argument
151 return interpreter->impl->tensor(interpreter->impl->inputs()[input_index]); in TfLiteInterpreterGetInputTensor()
155 int32_t input_index, in TfLiteInterpreterResizeInputTensor() argument
160 interpreter->impl->inputs()[input_index], dims); in TfLiteInterpreterResizeInputTensor()

123456