Home
last modified time | relevance | path

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

12

/external/tensorflow/tensorflow/core/kernels/
Dsegment_reduction_ops.cc54 const Tensor& segment_ids) { in SegmentReductionValidationHelper() argument
55 OP_REQUIRES(context, TensorShapeUtils::IsVector(segment_ids.shape()), in SegmentReductionValidationHelper()
57 const int64 num_indices = segment_ids.NumElements(); in SegmentReductionValidationHelper()
66 const Tensor& segment_ids) { in SegmentReductionDoValidation() argument
67 SegmentReductionValidationHelper(c, input, segment_ids); in SegmentReductionDoValidation()
82 const Tensor& segment_ids = context->input(1); in Compute() local
84 if (!SegmentReductionDoValidation(context, input, segment_ids)) { in Compute()
88 const int64 num_indices = segment_ids.NumElements(); in Compute()
92 const auto segment_vec = segment_ids.vec<Index>(); in Compute()
220 const Tensor& segment_ids = context->input(1); in ComputeAsync() local
[all …]
Dsegment_reduction_ops_gpu.cu.cc54 const Index* segment_ids, in SortedSegmentSumCustomKernel() argument
63 Index first_segment_id = segment_ids[input_outer_dim_index_base]; in SortedSegmentSumCustomKernel()
71 segment_ids[input_outer_dim_index_base + j]; in SortedSegmentSumCustomKernel()
108 const Index* segment_ids, in UnsortedSegmentCustomKernel() argument
115 const Index output_segment_index = segment_ids[input_segment_index]; in UnsortedSegmentCustomKernel()
131 typename TTypes<Index>::ConstFlat segment_ids, const Index data_size, in operator ()() argument
150 const Index input_outer_dim_size = segment_ids.dimension(0); in operator ()()
165 segment_ids.data(), data, output.data(), total_stripe_count); in operator ()()
173 typename TTypes<Index>::ConstFlat segment_ids, in operator ()()
192 const Index input_outer_dim_size = segment_ids.dimension(0); in operator ()()
[all …]
Dsegment_reduction_ops.h45 typename TTypes<Index>::ConstFlat segment_ids,
57 typename TTypes<Index>::ConstFlat segment_ids,
/external/tensorflow/tensorflow/contrib/layers/python/layers/
Dembedding_ops.py423 segment_ids = sparse_values.indices[:, 0]
424 if segment_ids.dtype != dtypes.int32:
425 segment_ids = math_ops.cast(segment_ids, dtypes.int32)
434 embeddings = math_ops.sparse_segment_sum(embeddings, idx, segment_ids,
437 embeddings = math_ops.sparse_segment_mean(embeddings, idx, segment_ids,
440 embeddings = math_ops.sparse_segment_sqrt_n(embeddings, idx, segment_ids,
540 segment_ids = sp_values.indices[:, 0]
544 sampled_candidates = array_ops.gather(sampled_candidates, segment_ids)
557 if segment_ids.dtype != dtypes.int32:
558 segment_ids = math_ops.cast(segment_ids, dtypes.int32)
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/
Dsegment_reduction_ops_test.py118 s = tf_op(data=tf_x, segment_ids=indices)
132 math_ops.segment_sum(data=tf_x, segment_ids=indices)
140 s = math_ops.segment_sum(data=tf_x, segment_ids=indices)
151 result = math_ops.segment_sum(data=tf_x, segment_ids=indices).eval()
161 s = math_ops.segment_sum(data=tf_x, segment_ids=indices)
172 s = math_ops.segment_sum(data=tf_x, segment_ids=indices)
181 s = math_ops.segment_sum(data=tf_x, segment_ids=indices)
192 s = math_ops.segment_sum(data=tf_x, segment_ids=indices)
201 s = math_ops.segment_sum(data=tf_x, segment_ids=indices)
213 s = math_ops.segment_sum(data=tf_x, segment_ids=indices)
[all …]
/external/tensorflow/tensorflow/python/ops/
Dembedding_ops.py434 segment_ids = sp_ids.indices[:, 0]
435 if segment_ids.dtype != dtypes.int32:
436 segment_ids = math_ops.cast(segment_ids, dtypes.int32)
470 embeddings = math_ops.segment_sum(embeddings, segment_ids, name=name)
472 embeddings = math_ops.segment_sum(embeddings, segment_ids)
473 weight_sum = math_ops.segment_sum(weights, segment_ids)
476 embeddings = math_ops.segment_sum(embeddings, segment_ids)
478 weight_sum = math_ops.segment_sum(weights_squared, segment_ids)
487 embeddings, idx, segment_ids, name=name)
490 embeddings, idx, segment_ids, name=name)
[all …]
Dmath_grad_test.py160 segment_ids = constant_op.constant([0, 0, 1], dtype=dtypes.int64)
161 segment_min = math_ops.segment_min(data, segment_ids)
169 segment_ids = constant_op.constant([0, 0, 1], dtype=dtypes.int64)
170 segment_max = math_ops.segment_max(data, segment_ids)
179 segment_ids = constant_op.constant([0, 0], dtype=dtypes.int64)
180 segment_min = math_ops.segment_min(data, segment_ids)
189 segment_ids = constant_op.constant([0, 0], dtype=dtypes.int64)
190 segment_max = math_ops.segment_max(data, segment_ids)
Dmath_ops.py2558 def _unsorted_segment_N(data, segment_ids, num_segments): argument
2563 ones_tensor = array_ops.ones(segment_ids.shape, dtype=data.dtype)
2564 N = gen_math_ops.unsorted_segment_sum(ones_tensor, segment_ids, num_segments)
2566 ndims_output = data.shape.ndims - segment_ids.shape.ndims
2573 def unsorted_segment_mean(data, segment_ids, num_segments, name=None): argument
2598 segment_ids = ops.convert_to_tensor(segment_ids)
2599 N = _unsorted_segment_N(data, segment_ids, num_segments)
2600 summed = gen_math_ops.unsorted_segment_sum(data, segment_ids, num_segments)
2605 def unsorted_segment_sqrt_n(data, segment_ids, num_segments, name=None): argument
2633 segment_ids = ops.convert_to_tensor(segment_ids)
[all …]
/external/tensorflow/tensorflow/core/api_def/base_api/
Dapi_def_UnsortedSegmentSum.pbtxt4 name: "segment_ids"
12 Has same shape as data, except for the first `segment_ids.rank`
24 that `segment_ids[j...] == i`. Unlike `SegmentSum`, `segment_ids`
Dapi_def_SparseSegmentMean.pbtxt6 A 1-D tensor. Has same rank as `segment_ids`.
10 name: "segment_ids"
27 Like `SegmentMean`, but `segment_ids` can have rank less than `data`'s first
Dapi_def_SparseSegmentMeanWithNumSegments.pbtxt6 A 1-D tensor. Has same rank as `segment_ids`.
10 name: "segment_ids"
30 Like `SparseSegmentMean`, but allows missing ids in `segment_ids`. If an id is
Dapi_def_SparseSegmentSqrtNWithNumSegments.pbtxt6 A 1-D tensor. Has same rank as `segment_ids`.
10 name: "segment_ids"
32 Like `SparseSegmentSqrtN`, but allows missing ids in `segment_ids`. If an id is
Dapi_def_SparseSegmentSumWithNumSegments.pbtxt6 A 1-D tensor. Has same rank as `segment_ids`.
10 name: "segment_ids"
30 Like `SparseSegmentSum`, but allows missing ids in `segment_ids`. If an id is
Dapi_def_SparseSegmentSum.pbtxt6 A 1-D tensor. Has same rank as `segment_ids`.
10 name: "segment_ids"
27 Like `SegmentSum`, but `segment_ids` can have rank less than `data`'s first
Dapi_def_SparseSegmentMeanGrad.pbtxt16 name: "segment_ids"
18 segment_ids passed to the corresponding SparseSegmentMean op.
Dapi_def_SparseSegmentSqrtNGrad.pbtxt16 name: "segment_ids"
18 segment_ids passed to the corresponding SparseSegmentSqrtN op.
Dapi_def_SparseSegmentSqrtN.pbtxt6 A 1-D tensor. Has same rank as `segment_ids`.
10 name: "segment_ids"
Dapi_def_SegmentMax.pbtxt4 name: "segment_ids"
24 that `segment_ids[j] == i`.
Dapi_def_SegmentMin.pbtxt4 name: "segment_ids"
24 that `segment_ids[j] == i`.
Dapi_def_SegmentProd.pbtxt4 name: "segment_ids"
24 that `segment_ids[j] == i`.
Dapi_def_UnsortedSegmentProd.pbtxt4 name: "segment_ids"
28 that `segment_ids[j] == i`.
Dapi_def_SegmentSum.pbtxt4 name: "segment_ids"
24 that `segment_ids[j] == i`.
Dapi_def_UnsortedSegmentMin.pbtxt4 name: "segment_ids"
27 that `segment_ids[j] == i`.
Dapi_def_SegmentMean.pbtxt4 name: "segment_ids"
24 over `j` such that `segment_ids[j] == i` and `N` is the total number of
Dapi_def_UnsortedSegmentMax.pbtxt4 name: "segment_ids"
27 that `segment_ids[j] == i`.

12