/external/tensorflow/tensorflow/python/ops/ragged/ |
D | ragged_math_ops.py | 151 segment_ids, argument 185 ragged_tensor.is_ragged(segment_ids)): 186 return unsorted_segment_op(data, segment_ids, num_segments, name) 189 [data, segment_ids, num_segments]) as name: 191 segment_ids = ragged_tensor.convert_to_tensor_or_ragged_tensor( 192 segment_ids, name='segment_ids') 194 if ragged_tensor.is_ragged(segment_ids): 199 segment_ids.row_splits, 204 segment_ids.values, num_segments, name) 206 segment_ids = math_ops.cast(segment_ids, dtypes.int64) [all …]
|
D | ragged_segment_op_test.py | 55 def expected_value(self, data, segment_ids, num_segments, combiner): argument 66 self.assertLen(data, len(segment_ids)) 75 grouped[segment_ids[row]][col].append(data[row][col]) 105 def testRaggedSegment_Int(self, segment_op, combiner, segment_ids): argument 108 num_segments = max(segment_ids) + 1 109 expected = self.expected_value(rt_as_list, segment_ids, num_segments, 112 segmented = segment_op(rt, segment_ids, num_segments) 141 def testRaggedSegment_Float(self, segment_op, combiner, segment_ids): argument 144 num_segments = max(segment_ids) + 1 145 expected = self.expected_value(rt_as_list, segment_ids, num_segments, [all …]
|
D | ragged_segment_ids_to_row_splits_op_test.py | 32 segment_ids = [0, 0, 0, 2, 2, 3, 4, 4, 4] 34 splits = segment_id_ops.segment_ids_to_row_splits(segment_ids) 39 segment_ids = segment_id_ops.segment_ids_to_row_splits([]) 40 self.assertAllEqual(segment_ids, [0]) 53 segment_ids = [0, 0, 0, 2, 2, 3, 4, 4, 4] 56 splits = segment_id_ops.segment_ids_to_row_splits(segment_ids, num_segments) 61 segment_ids = [0, 4, 3, 2, 4, 4, 2, 0, 0] 62 splits1 = segment_id_ops.segment_ids_to_row_splits(segment_ids) 65 splits2 = segment_id_ops.segment_ids_to_row_splits(segment_ids, 7)
|
D | segment_id_ops.py | 69 def segment_ids_to_row_splits(segment_ids, num_segments=None, name=None): argument 89 with ops.name_scope(name, "SegmentIdsToRaggedSplits", [segment_ids]) as name: 90 segment_ids = ragged_util.convert_to_int_tensor(segment_ids, "segment_ids") 91 segment_ids.shape.assert_has_rank(1) 98 segment_ids,
|
D | ragged_row_splits_to_segment_ids_op_test.py | 34 segment_ids = segment_id_ops.row_splits_to_segment_ids(splits) 35 self.assertAllEqual(segment_ids, expected) 39 segment_ids = segment_id_ops.row_splits_to_segment_ids([0]) 40 self.assertAllEqual(segment_ids, [])
|
/external/tensorflow/tensorflow/contrib/layers/python/layers/ |
D | embedding_ops.py | 437 segment_ids = sparse_values.indices[:, 0] 438 if segment_ids.dtype != dtypes.int32: 439 segment_ids = math_ops.cast(segment_ids, dtypes.int32) 448 embeddings = math_ops.sparse_segment_sum(embeddings, idx, segment_ids, 451 embeddings = math_ops.sparse_segment_mean(embeddings, idx, segment_ids, 454 embeddings = math_ops.sparse_segment_sqrt_n(embeddings, idx, segment_ids, 558 segment_ids = sp_values.indices[:, 0] 562 sampled_candidates = array_ops.gather(sampled_candidates, segment_ids) 575 if segment_ids.dtype != dtypes.int32: 576 segment_ids = math_ops.cast(segment_ids, dtypes.int32) [all …]
|
/external/tensorflow/tensorflow/core/kernels/ |
D | segment_reduction_ops.cc | 56 const Tensor& segment_ids) { in SegmentReductionValidationHelper() argument 57 OP_REQUIRES(context, TensorShapeUtils::IsVector(segment_ids.shape()), in SegmentReductionValidationHelper() 59 const int64 num_indices = segment_ids.NumElements(); in SegmentReductionValidationHelper() 68 const Tensor& segment_ids) { in SegmentReductionDoValidation() argument 69 SegmentReductionValidationHelper(c, input, segment_ids); in SegmentReductionDoValidation() 84 const Tensor& segment_ids = context->input(1); in Compute() local 86 if (!SegmentReductionDoValidation(context, input, segment_ids)) { in Compute() 90 const int64 num_indices = segment_ids.NumElements(); in Compute() 94 const auto segment_vec = segment_ids.vec<Index>(); in Compute() 222 const Tensor& segment_ids = context->input(1); in ComputeAsync() local [all …]
|
D | segment_reduction_ops_gpu.cu.cc | 57 const Index* segment_ids, in SortedSegmentSumCustomKernel() argument 66 Index first_segment_id = segment_ids[input_outer_dim_index_base]; in SortedSegmentSumCustomKernel() 74 segment_ids[input_outer_dim_index_base + j]; in SortedSegmentSumCustomKernel() 111 const Index* segment_ids, in UnsortedSegmentCustomKernel() argument 118 const Index output_segment_index = segment_ids[input_segment_index]; in UnsortedSegmentCustomKernel() 134 typename TTypes<Index>::ConstFlat segment_ids, const Index data_size, in operator ()() argument 154 const Index input_outer_dim_size = segment_ids.dimension(0); in operator ()() 170 segment_ids.data(), data, output.data(), total_stripe_count)); in operator ()() 178 typename TTypes<Index>::ConstFlat segment_ids, in operator ()() 198 const Index input_outer_dim_size = segment_ids.dimension(0); in operator ()() [all …]
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
D | segment_reduction_ops_test.py | 121 s = tf_op(data=tf_x, segment_ids=indices) 136 math_ops.segment_sum(data=tf_x, segment_ids=indices) 145 s = math_ops.segment_sum(data=tf_x, segment_ids=indices) 157 result = math_ops.segment_sum(data=tf_x, segment_ids=indices).eval() 167 s = math_ops.segment_sum(data=tf_x, segment_ids=indices) 178 s = math_ops.segment_sum(data=tf_x, segment_ids=indices) 188 s = math_ops.segment_sum(data=tf_x, segment_ids=indices) 200 s = math_ops.segment_sum(data=tf_x, segment_ids=indices) 210 s = math_ops.segment_sum(data=tf_x, segment_ids=indices) 223 s = math_ops.segment_sum(data=tf_x, segment_ids=indices) [all …]
|
/external/tensorflow/tensorflow/python/ops/ |
D | embedding_ops.py | 478 segment_ids = sp_ids.indices[:, 0] 479 if segment_ids.dtype != dtypes.int32: 480 segment_ids = math_ops.cast(segment_ids, dtypes.int32) 515 embeddings = math_ops.segment_sum(embeddings, segment_ids, name=name) 517 embeddings = math_ops.segment_sum(embeddings, segment_ids) 518 weight_sum = math_ops.segment_sum(weights, segment_ids) 521 embeddings = math_ops.segment_sum(embeddings, segment_ids) 523 weight_sum = math_ops.segment_sum(weights_squared, segment_ids) 532 embeddings, idx, segment_ids, name=name) 535 embeddings, idx, segment_ids, name=name) [all …]
|
D | math_ops.py | 3208 def _unsorted_segment_N(data, segment_ids, num_segments): argument 3213 segment_ids_shape = array_ops.shape_internal(segment_ids) 3215 N = gen_math_ops.unsorted_segment_sum(ones_tensor, segment_ids, num_segments) 3217 ndims_output = data.shape.ndims - segment_ids.shape.ndims 3228 def unsorted_segment_mean(data, segment_ids, num_segments, name=None): argument 3263 segment_ids = ops.convert_to_tensor(segment_ids) 3264 N = _unsorted_segment_N(data, segment_ids, num_segments) 3265 summed = gen_math_ops.unsorted_segment_sum(data, segment_ids, num_segments) 3274 def unsorted_segment_sqrt_n(data, segment_ids, num_segments, name=None): argument 3312 segment_ids = ops.convert_to_tensor(segment_ids) [all …]
|
/external/tensorflow/tensorflow/core/api_def/base_api/ |
D | api_def_UnsortedSegmentSum.pbtxt | 4 name: "segment_ids" 12 Has same shape as data, except for the first `segment_ids.rank` 25 that `segment_ids[j...] == i`. Unlike `SegmentSum`, `segment_ids`
|
D | api_def_SparseSegmentMean.pbtxt | 6 A 1-D tensor. Has same rank as `segment_ids`. 10 name: "segment_ids" 26 Like `SegmentMean`, but `segment_ids` can have rank less than `data`'s first
|
D | api_def_SparseSegmentMeanWithNumSegments.pbtxt | 6 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
|
D | api_def_SparseSegmentSqrtNWithNumSegments.pbtxt | 6 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
|
D | api_def_SparseSegmentSumWithNumSegments.pbtxt | 6 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
|
D | api_def_SparseSegmentSum.pbtxt | 6 A 1-D tensor. Has same rank as `segment_ids`. 10 name: "segment_ids" 28 Like `SegmentSum`, but `segment_ids` can have rank less than `data`'s first
|
D | api_def_UnsortedSegmentProd.pbtxt | 4 name: "segment_ids" 12 Has same shape as data, except for the first `segment_ids.rank` 29 `j...` such that `segment_ids[j...] == i`.
|
D | api_def_UnsortedSegmentMin.pbtxt | 4 name: "segment_ids" 12 Has same shape as data, except for the first `segment_ids.rank` 28 that `segment_ids[j...] == i`.
|
D | api_def_UnsortedSegmentMax.pbtxt | 4 name: "segment_ids" 12 Has same shape as data, except for the first `segment_ids.rank` 28 that `segment_ids[j...] == i`.
|
D | api_def_SparseSegmentMeanGrad.pbtxt | 16 name: "segment_ids" 18 segment_ids passed to the corresponding SparseSegmentMean op.
|
D | api_def_SparseSegmentSqrtNGrad.pbtxt | 16 name: "segment_ids" 18 segment_ids passed to the corresponding SparseSegmentSqrtN op.
|
D | api_def_SparseSegmentSqrtN.pbtxt | 6 A 1-D tensor. Has same rank as `segment_ids`. 10 name: "segment_ids"
|
/external/tensorflow/tensorflow/tools/api/golden/v2/ |
D | tensorflow.math.pbtxt | 365 …argspec: "args=[\'data\', \'segment_ids\', \'name\'], varargs=None, keywords=None, defaults=[\'Non… 369 …argspec: "args=[\'data\', \'segment_ids\', \'name\'], varargs=None, keywords=None, defaults=[\'Non… 373 …argspec: "args=[\'data\', \'segment_ids\', \'name\'], varargs=None, keywords=None, defaults=[\'Non… 377 …argspec: "args=[\'data\', \'segment_ids\', \'name\'], varargs=None, keywords=None, defaults=[\'Non… 381 …argspec: "args=[\'data\', \'segment_ids\', \'name\'], varargs=None, keywords=None, defaults=[\'Non… 445 …argspec: "args=[\'data\', \'segment_ids\', \'num_segments\', \'name\'], varargs=None, keywords=Non… 449 …argspec: "args=[\'data\', \'segment_ids\', \'num_segments\', \'name\'], varargs=None, keywords=Non… 453 …argspec: "args=[\'data\', \'segment_ids\', \'num_segments\', \'name\'], varargs=None, keywords=Non… 457 …argspec: "args=[\'data\', \'segment_ids\', \'num_segments\', \'name\'], varargs=None, keywords=Non… 461 …argspec: "args=[\'data\', \'segment_ids\', \'num_segments\', \'name\'], varargs=None, keywords=Non… [all …]
|
/external/tensorflow/tensorflow/tools/api/golden/v1/ |
D | tensorflow.math.pbtxt | 365 …argspec: "args=[\'data\', \'segment_ids\', \'name\'], varargs=None, keywords=None, defaults=[\'Non… 369 …argspec: "args=[\'data\', \'segment_ids\', \'name\'], varargs=None, keywords=None, defaults=[\'Non… 373 …argspec: "args=[\'data\', \'segment_ids\', \'name\'], varargs=None, keywords=None, defaults=[\'Non… 377 …argspec: "args=[\'data\', \'segment_ids\', \'name\'], varargs=None, keywords=None, defaults=[\'Non… 381 …argspec: "args=[\'data\', \'segment_ids\', \'name\'], varargs=None, keywords=None, defaults=[\'Non… 445 …argspec: "args=[\'data\', \'segment_ids\', \'num_segments\', \'name\'], varargs=None, keywords=Non… 449 …argspec: "args=[\'data\', \'segment_ids\', \'num_segments\', \'name\'], varargs=None, keywords=Non… 453 …argspec: "args=[\'data\', \'segment_ids\', \'num_segments\', \'name\'], varargs=None, keywords=Non… 457 …argspec: "args=[\'data\', \'segment_ids\', \'num_segments\', \'name\'], varargs=None, keywords=Non… 461 …argspec: "args=[\'data\', \'segment_ids\', \'num_segments\', \'name\'], varargs=None, keywords=Non… [all …]
|