Home
last modified time | relevance | path

Searched refs:output_indices (Results 1 – 25 of 34) sorted by relevance

12

/external/tensorflow/tensorflow/core/kernels/
Dsparse_slice_grad_op.cc30 const Tensor *backprop_val_grad, *input_indices, *output_indices, *input_start; in Compute() local
34 OP_REQUIRES_OK(ctx, ctx->input("output_indices", &output_indices)); in Compute()
38 TensorShapeUtils::IsMatrix(output_indices->shape()), in Compute()
43 output_indices->shape().DebugString())); in Compute()
51 input_indices->dim_size(1) == output_indices->dim_size(1), in Compute()
54 output_indices->dim_size(1))); in Compute()
56 ctx, output_indices->dim_size(0) <= input_indices->dim_size(0), in Compute()
59 output_indices->dim_size(0), " and ", in Compute()
62 ctx, backprop_val_grad->NumElements() == output_indices->dim_size(0), in Compute()
66 output_indices->dim_size(0))); in Compute()
[all …]
Ddeserialize_sparse_variant_op.cc59 const Tensor* output_indices; in Compute() local
69 output_shape->NumElements(), &output_indices, in Compute()
71 context->set_output(0, *output_indices); in Compute()
152 Tensor* output_indices; in Compute() local
159 &output_indices)); in Compute()
169 int64* output_indices_data = output_indices->matrix<int64>().data(); in Compute()
304 int index, int expected_rank, const Tensor** output_indices, in GetAndValidateSparseTensorIndicesAndValues() argument
307 *output_indices = serialized_indices.get<Tensor>(); in GetAndValidateSparseTensorIndicesAndValues()
308 if (*output_indices == nullptr) { in GetAndValidateSparseTensorIndicesAndValues()
312 if ((*output_indices)->dtype() != DT_INT64) { in GetAndValidateSparseTensorIndicesAndValues()
[all …]
Ddeserialize_sparse_string_op.cc80 Tensor output_indices; in Compute() local
87 &output_indices, &output_values, &output_shape)); in Compute()
88 context->set_output(0, output_indices); in Compute()
103 Tensor output_indices; in Compute() local
109 serialized_sparse_t(i, 2), dtype_, i, &output_indices, in Compute()
111 int64 num_entries = output_indices.dim_size(0); in Compute()
112 int rank = output_indices.dim_size(1); in Compute()
117 const auto& output_indices_t = output_indices.matrix<int64>(); in Compute()
229 Tensor* output_indices, Tensor* output_values, Tensor* output_shape) { in GetAndValidateSparseTensor() argument
231 TF_RETURN_IF_ERROR(this->Deserialize(serialized_indices, output_indices)); in GetAndValidateSparseTensor()
[all …]
Dsparse_tensors_map_ops.cc295 Tensor output_indices = Tensor(DT_INT64, {num_entries, rank - 1}); in Compute() local
298 auto output_indices_t = output_indices.matrix<int64>(); in Compute()
310 SparseTensor::Create(output_indices, output_values, in Compute()
387 const Tensor& output_indices = st.indices(); in Compute() local
391 OP_REQUIRES(context, TensorShapeUtils::IsMatrix(output_indices.shape()), in Compute()
395 output_indices.shape().DebugString())); in Compute()
408 int64 num_entries = output_indices.dim_size(0); in Compute()
415 int rank = output_indices.dim_size(1); in Compute()
427 DT_INT64, TensorShape({num_entries, 1 + output_indices.dim_size(1)})); in Compute()
429 const auto& output_indices_t = output_indices.matrix<int64>(); in Compute()
Dsparse_fill_empty_rows_op.cc145 auto output_indices = output_indices_t->matrix<int64>(); in Compute() local
146 output_indices.device(d) = output_indices.constant(0); in Compute()
168 std::copy_n(&indices(i, 0), rank, &output_indices(output_i, 0)); in Compute()
182 output_indices(starting_index, 0) = row; in Compute()
Dserialize_sparse_op.cc240 Tensor output_indices = Tensor(DT_INT64, {num_entries, rank - 1}); in Compute() local
243 auto output_indices_t = output_indices.matrix<int64>(); in Compute()
254 context, this->Serialize(output_indices, &serialized_sparse_t(b, 0))); in Compute()
Ddecode_proto_op.cc681 std::vector<int> output_indices; in DecodeProtoOp() local
682 output_indices.reserve(field_names.size()); in DecodeProtoOp()
684 output_indices.push_back(i); in DecodeProtoOp()
686 std::sort(output_indices.begin(), output_indices.end(), in DecodeProtoOp()
693 const int output_index = output_indices[i]; in DecodeProtoOp()
/external/libtextclassifier/utils/tflite/
Ddist_diversification.cc83 TfLiteTensor& output_indices = in AllocateOutputIndexes() local
86 return context->ResizeTensor(context, &output_indices, in AllocateOutputIndexes()
97 TfLiteTensor& output_indices = in Prepare() local
100 tflite::SetTensorToDynamic(&output_indices); in Prepare()
110 TfLiteTensor& output_indices = in Eval() local
113 if (tflite::IsDynamicTensor(&output_indices)) { in Eval()
133 std::copy(indices.begin(), indices.end(), output_indices.data.i32); in Eval()
134 std::fill_n(output_indices.data.i32 + indices.size(), in Eval()
/external/tensorflow/tensorflow/compiler/xla/tests/
Dreverse_test.cc93 std::vector<int64> output_indices(spec.input_dims.size()); in TEST_P() local
96 output_indices[i] = indices[i]; in TEST_P()
100 output_indices[dim] = (spec.input_dims[dim] - 1) - indices[dim]; in TEST_P()
102 expected.Set<float>(output_indices, value); in TEST_P()
/external/tensorflow/tensorflow/python/ops/
Dsparse_ops.py949 output_indices, output_values, output_shape = gen_sparse_ops.sparse_slice(
957 return sparse_tensor.SparseTensor(output_indices, output_values,
1867 (output_indices, output_values, empty_row_indicator,
1874 indices=output_indices,
2045 output_indices, output_values, output_shape = (
2049 output_indices.set_shape([None, rank])
2052 return sparse_tensor.SparseTensor(output_indices, output_values, output_shape)
2117 output_indices, output_values, output_shape = (
2122 output_indices.set_shape([None, rank])
2125 return sparse_tensor.SparseTensor(output_indices, output_values, output_shape)
[all …]
Dsparse_grad.py139 output_indices = op.outputs[0]
142 backprop_val_grad, input_indices, input_start, output_indices)
/external/tensorflow/tensorflow/lite/toco/graph_transformations/
Dresolve_constant_binary.cc126 const std::vector<int> output_indices = ReverseOffset(output_shape, k); in EvaluateBinaryOperatorOnConstantInputs() local
128 modulo_indices[i] = output_indices[i] % small_sizes[i]; in EvaluateBinaryOperatorOnConstantInputs()
130 PairwiseVectorSelect(input0_larger, output_indices, modulo_indices, in EvaluateBinaryOperatorOnConstantInputs()
163 output_data[Offset(output_shape, output_indices)] = outval; in EvaluateBinaryOperatorOnConstantInputs()
Dresolve_constant_unary.cc64 std::vector<int> output_indices(input_shape.dimensions_count()); in ReduceGeneric() local
70 output_indices[i] = input_indices[i] * reduction_mask[i]; in ReduceGeneric()
72 int output_offset = Offset(output_shape, output_indices); in ReduceGeneric()
73 if (input_indices == output_indices) { in ReduceGeneric()
/external/tensorflow/tensorflow/python/eager/
Dops_test.py143 output_indices, output_values, output_shape = result
144 self.assertEqual(2, len(output_indices))
147 self.assertEqual(output_indices, result.output_indices)
150 self.assertAllEqual([[0, 2], [1, 0], [1, 1]], output_indices[0])
151 self.assertAllEqual([[0, 0], [0, 1]], output_indices[1])
/external/tensorflow/tensorflow/core/api_def/base_api/
Dapi_def_SparseReorder.pbtxt23 name: "output_indices"
32 1-D. `N` non-empty values corresponding to `output_indices`.
Dapi_def_SparseReshape.pbtxt23 name: "output_indices"
52 `input_shape` has length `R_in`, `output_indices` has shape `[N, R_out]`, and
Dapi_def_SparseFillEmptyRows.pbtxt52 same `dense_shape` but with indices `output_indices` and values
85 reverse_index_map[j] = out_j s.t. indices[j, :] == output_indices[out_j, :]
Dapi_def_SparseSliceGrad.pbtxt23 name: "output_indices"
Dapi_def_SparseSparseMinimum.pbtxt41 name: "output_indices"
Dapi_def_SparseSparseMaximum.pbtxt41 name: "output_indices"
Dapi_def_SparseCross.pbtxt28 name: "output_indices"
/external/tensorflow/tensorflow/core/util/sparse/
Dsparse_tensor.h575 std::vector<Tensor> output_indices; in Split() local
578 output_indices.reserve(num_split); in Split()
614 output_indices.emplace_back(DT_INT64, in Split()
619 output_indices_t.emplace_back(output_indices[i].matrix<int64>()); in Split()
645 Create(output_indices[i], output_values[i], output_shapes[i], &tensor); in Split()
696 Tensor output_indices(DT_INT64, TensorShape({count, dims})); in Slice()
699 auto output_indices_t = output_indices.matrix<int64>(); in Slice()
726 return SparseTensor(output_indices, output_values, output_shape); in Slice()
/external/tensorflow/tensorflow/core/ops/
Dsparse_ops.cc287 ShapeHandle output_indices = in __anona7ffb82a0c02() local
296 c->set_output(out_idx++, output_indices); in __anona7ffb82a0c02()
330 ShapeHandle output_indices = in __anona7ffb82a0e02() local
335 c->set_output(0, output_indices); in __anona7ffb82a0e02()
582 ShapeHandle output_indices = in __anona7ffb82a1602() local
590 c->set_output(0, output_indices); in __anona7ffb82a1602()
/external/tensorflow/tensorflow/java/src/main/native/
Dgraph_jni.cc216 jintArray output_indices = env->NewIntArray(noutputs); in buildSubgraph() local
224 env->GetIntArrayElements(output_indices, nullptr); in buildSubgraph()
239 env->ReleaseIntArrayElements(output_indices, output_indices_elems, 0); in buildSubgraph()
245 input_handles, input_indices, output_handles, output_indices); in buildSubgraph()
/external/tensorflow/tensorflow/compiler/xla/
Dliteral.h1157 DimensionVector output_indices(bounds.size(), 0); in Replicate()
1158 absl::Span<const int64> input_indices = output_indices; in Replicate()
1164 literal.Set<NativeT>(output_indices, element); in Replicate()
1167 for (int n = 0; n < output_indices.size(); ++n) { in Replicate()
1168 ++output_indices[n]; in Replicate()
1169 if (output_indices[n] < bounds[n]) { in Replicate()
1173 output_indices[n] = 0; in Replicate()

12