Home
last modified time | relevance | path

Searched refs:ragged_rank (Results 1 – 25 of 93) sorted by relevance

1234

/external/tensorflow/tensorflow/python/ops/ragged/
Dragged_const_op_test.py57 ragged_rank=1,
65 ragged_rank=1,
76 ragged_rank=1,
86 ragged_rank=1,
98 ragged_rank=1,
130 dict(pylist=[], ragged_rank=1, expected_shape=(0, None)),
131 dict(pylist=[], ragged_rank=2, expected_shape=(0, None, None)),
135 ragged_rank=1,
140 ragged_rank=2,
143 dict(pylist=[[], [], []], ragged_rank=2, expected_shape=(3, None, None)),
[all …]
Dragged_factory_ops.py39 def constant(pylist, dtype=None, ragged_rank=None, inner_shape=None, argument
87 ragged_rank, inner_shape)
92 def constant_value(pylist, dtype=None, ragged_rank=None, inner_shape=None, argument
147 ragged_rank, inner_shape)
150 def _constant_value(ragged_factory, inner_factory, pylist, dtype, ragged_rank, argument
176 if ragged_rank is not None and ragged_rank != 0:
178 (pylist, ragged_rank))
185 if ragged_rank is not None and ragged_rank < 0:
187 "Invalid ragged_rank=%r: must be nonnegative" % ragged_rank)
198 if inner_shape is not None and ragged_rank is not None:
[all …]
Dragged_constant_value_op_test.py55 ragged_rank=1,
63 ragged_rank=1,
74 ragged_rank=1,
84 ragged_rank=1,
96 ragged_rank=1,
128 dict(pylist=[], ragged_rank=1, expected_shape=(0, None)),
129 dict(pylist=[], ragged_rank=2, expected_shape=(0, None, None)),
133 ragged_rank=1,
138 ragged_rank=2,
141 dict(pylist=[[], [], []], ragged_rank=2, expected_shape=(3, None, None)),
[all …]
Dragged_batch_gather_op_test.py91 ragged_rank=2),
96 ragged_rank=2)),
111 ragged_rank=1),
113 [[[2, 0], [0, 1]], [[1, 0]]], ragged_rank=1),
115 [[[b'c', b'a'], [b'd', b'e']], [[b'h', b'g']]], ragged_rank=1)),
120 [[['a', 'b', 'c'], ['d']], [['e', 'f']]], ragged_rank=2),
122 [[[2, 0], [0, 0]], [[1, 0]]], ragged_rank=1),
124 [[[b'c', b'a'], [b'd', b'd']], [[b'f', b'e']]], ragged_rank=1)),
130 ragged_rank=1),
132 [[[2, 1, 0], [0]], [[1, 1]]], ragged_rank=2),
[all …]
Dragged_from_tensor_op_test.py356 ragged_rank=1, argument
361 rt = RaggedTensor.from_tensor(dt, lengths, padding, ragged_rank)
365 self.assertEqual(rt.ragged_rank, ragged_rank)
380 for ragged_rank in range(1, 4):
381 rt = RaggedTensor.from_tensor(dt, ragged_rank=ragged_rank)
383 self.assertEqual(rt.ragged_rank, ragged_rank)
499 for ragged_rank in range(1, len(dt_shape) - 1):
500 rt = RaggedTensor.from_tensor(dt, lengths, padding, ragged_rank)
502 self.assertEqual(rt.ragged_rank, ragged_rank)
554 for ragged_rank in range(1, len(dt.shape) - 1):
[all …]
Dragged_expand_dims_op_test.py66 ragged_rank=0,
71 ragged_rank=0,
76 ragged_rank=0,
85 ragged_rank=2,
90 ragged_rank=2,
95 ragged_rank=2,
100 ragged_rank=2,
105 ragged_rank=2,
114 ragged_rank=None, argument
116 rt = ragged_factory_ops.constant(rt_input, ragged_rank=ragged_rank)
Dragged_one_hot_op_test.py72 ragged_rank=1,
78 ragged_rank=1,
93 ragged_rank=None): argument
95 indices, ragged_rank=ragged_rank)
104 self.assertEqual(result.ragged_rank, ragged_indices.ragged_rank)
127 ragged_rank=None): argument
129 indices, ragged_rank=ragged_rank)
182 for ragged_rank in range(1, len(indices_shape)):
183 if axis is not None and 0 <= axis <= ragged_rank:
186 indices, ragged_rank=ragged_rank)
Dragged_to_tensor_op_test.py327 ragged_rank=None, argument
333 rt_input, ragged_rank=ragged_rank, inner_shape=inner_shape)
395 ragged_rank=None, argument
398 rt = ragged_factory_ops.constant(rt_input, ragged_rank=ragged_rank)
457 ragged_rank=1)
466 ragged_rank=1)
488 ragged_from_tensor = RaggedTensor.from_tensor(tensor, ragged_rank=2)
547 ragged_rank = 1,
557 ragged_rank = 1,
567 ragged_rank = 1,
[all …]
Dragged_row_lengths_op_test.py60 ragged_rank=1,
64 ragged_rank=1,
71 ragged_rank=1,
76 ragged_rank=1,
81 ragged_rank=1,
118 ragged_rank=None, argument
120 rt = ragged_factory_ops.constant(rt_input, ragged_rank=ragged_rank)
125 self.assertEqual(lengths.ragged_rank, expected_ragged_rank)
Dragged_map_fn_op_test.py76 dtype=dtypes.int64, ragged_rank=1),
85 dtype=dtypes.int64, ragged_rank=1),
94 dtype=dtypes.int64, ragged_rank=2),
102 dtype=dtypes.int64, ragged_rank=2),
110 dtype=dtypes.int64, ragged_rank=1),
118 dtype=dtypes.int64, ragged_rank=1),
133 dtype=dtypes.int64, ragged_rank=1),
142 dtype=dtypes.int64, ragged_rank=2),
151 dtype=dtypes.int64, ragged_rank=4),
159 dtype=dtypes.int64, ragged_rank=2)),
[all …]
Dragged_reverse_op_test.py63 ragged_rank=1),
75 def testReverse(self, descr, data, axis, expected, ragged_rank=None): argument
76 data = ragged_factory_ops.constant(data, ragged_rank=ragged_rank)
78 expected = ragged_factory_ops.constant(expected, ragged_rank=ragged_rank)
85 ragged_factory_ops.constant([[1], [2, 3]], ragged_rank=1), [0, None])
Dragged_concat_ops.py187 rt_inputs[i], ragged_rank=1, row_splits_dtype=row_splits_dtype)
190 ragged_rank = max(max(rt.ragged_rank for rt in rt_inputs), 1)
191 rt_inputs = [_increase_ragged_rank_to(rt, ragged_rank, row_splits_dtype)
225 ragged_rank = rt_inputs[0].ragged_rank
229 for dim in range(ragged_rank)
300 def _increase_ragged_rank_to(rt_input, ragged_rank, row_splits_dtype): argument
302 if ragged_rank > 0:
306 if rt_input.ragged_rank < ragged_rank:
308 _increase_ragged_rank_to(rt_input.values, ragged_rank - 1,
Dragged_array_ops.py114 ragged_rank=mask.ragged_rank,
119 mask.nested_row_splits, data.nested_row_splits[:mask.ragged_rank]
175 ragged_rank=min(data.ragged_rank, mask.shape.ndims - 1),
277 ragged_rank = rt_input.ragged_rank
286 for axis in range(ragged_rank, 0, -1):
307 inner_repeats = array_ops.concat([multiples[:1], multiples[ragged_rank + 1:]],
336 ragged_rank = rt_input.ragged_rank
343 projected_splits = [{i: nested_splits[i]} for i in range(ragged_rank)]
344 for src_axis in range(ragged_rank):
345 for dst_axis in range(src_axis + 1, ragged_rank - 1):
[all …]
Dragged_print_op_test.py137 dict(testcase_name='2d_empty', rt=[], ragged_rank=1, expected='[]'),
138 dict(testcase_name='3d_empty', rt=[], ragged_rank=2, expected='[]'),
142 ragged_rank=1,
145 testcase_name='2d_empty_row', rt=[[]], ragged_rank=1,
148 testcase_name='3d_empty_row', rt=[[]], ragged_rank=2,
161 def testRaggedToString(self, rt, expected, summarize=None, ragged_rank=None): argument
162 rt = ragged_factory_ops.constant(rt, ragged_rank=ragged_rank)
184 input_signature=[ragged_tensor.RaggedTensorSpec(ragged_rank=1)])
Dragged_rank_op_test.py62 ragged_rank=2,
77 ragged_rank=2,
81 def testRaggedRank(self, test_input, expected_rank, ragged_rank=None): argument
83 test_input, ragged_rank=ragged_rank)
Dragged_merge_dims_op_test.py188 for ragged_rank in ragged_ranks:
189 x = ragged_factory_ops.constant(rt, ragged_rank=ragged_rank)
265 ragged_rank=None): argument
266 x = ragged_factory_ops.constant(rt, ragged_rank=ragged_rank)
Dragged_conversion_ops.py33 ragged_rank=1, argument
43 ragged_rank=ragged_rank,
69 ragged_rank = sum(
79 shape=array_ops.shape(grad)[:1 + ragged_rank],
176 ragged_rank = len(op.inputs) - 1
177 row_splits = 0 if ragged_rank == 0 else op.inputs[0]
183 result = [None] * ragged_rank + [values_grad]
Dragged_boolean_mask_op_test.py96 ragged_rank=1)),
134 ragged_rank=1),
138 ragged_rank=1)),
171 ragged_rank=1)),
177 ragged_rank=1),
200 ragged_rank=1),
204 ragged_rank=1)),
209 ragged_rank=1),
213 ragged_rank=1)),
229 ragged_rank=1),
[all …]
Dragged_tensor_test.py92 self.assertEqual(outer_rt.ragged_rank, 2)
189 self.assertEqual(rt.ragged_rank, 1)
214 self.assertEqual(rt.ragged_rank, 1)
236 self.assertEqual(rt.ragged_rank, 1)
257 self.assertEqual(rt.ragged_rank, 1)
276 self.assertEqual(rt.ragged_rank, 1)
289 self.assertEqual(rt.ragged_rank, 1)
331 self.assertEqual(rt.ragged_rank, 1)
350 self.assertEqual(rt.ragged_rank, 1)
369 self.assertEqual(rt.ragged_rank, 1)
[all …]
Dragged_tile_op_test.py95 ragged_rank=1,
102 ragged_rank=1,
108 ragged_rank=1,
191 ragged_rank=None): argument
192 rt = ragged_factory_ops.constant(rt_input, ragged_rank)
207 self.assertEqual(tiled.ragged_rank, rt.ragged_rank)
Dragged_gather_nd_op_test.py94 ragged_rank=1,
98 ragged_rank=1)),
120 indices=ragged_factory_ops.constant_value([[[0]]], ragged_rank=1),
122 [[[[b'a']]]], ragged_rank=1)),
153 ragged_rank=1),
162 ragged_rank=1),
172 ragged_rank=1),
190 ragged_rank=1),
198 ragged_rank=2),
Dragged_dispatch_test.py51 self.assertEqual(x.ragged_rank, y.ragged_rank)
72 [[-2, 3], [-3]], ragged_rank=1)},
77 ragged_rank=1)},
80 ragged_rank=2)},
191 ragged_rank=1),
194 ragged_rank=1)},
231 ragged_rank=1),
234 ragged_rank=1),
238 ragged_rank=1),
241 ragged_rank=1),
[all …]
/external/tensorflow/tensorflow/core/kernels/
Dragged_tensor_variant.h55 int ragged_rank() const { return nested_splits_.size(); } in ragged_rank() function
91 if (x.ragged_rank() != y.ragged_rank()) { in RaggedTensorVariantBinaryAdd()
94 x.ragged_rank(), " and the other is ", y.ragged_rank()); in RaggedTensorVariantBinaryAdd()
96 for (int i = 0; i < x.ragged_rank(); ++i) { in RaggedTensorVariantBinaryAdd()
/external/tflite-support/tensorflow_lite_support/custom_ops/kernel/ragged/
Dragged_tensor_to_tensor_tflite.cc47 int ragged_rank = 0; member
229 int ragged_rank, const RuntimeShape& output_shape, in CombineRaggedTensorToTensorShapes() argument
235 const int output_shape_rank = ragged_rank + value_shape.DimensionsCount(); in CombineRaggedTensorToTensorShapes()
251 TfLiteNode* node, int first_dimension, int ragged_rank, in CalculateOutputSize() argument
264 ragged_rank, output_shape_shape, values_shape); in CalculateOutputSize()
268 for (int i = 1; i <= ragged_rank; ++i) { in CalculateOutputSize()
450 void SetOutputT(TfLiteContext* context, int ragged_rank, in SetOutputT() argument
462 RuntimeShape(output_shape.DimensionsCount() - ragged_rank - 1, in SetOutputT()
463 output_shape.DimsData() + ragged_rank + 1); in SetOutputT()
525 void SetOutput(TfLiteContext* context, int ragged_rank, in SetOutput() argument
[all …]
/external/tensorflow/tensorflow/core/util/
Dragged_to_dense_util.cc41 int ragged_rank, const TensorShapeProto& shape, in CombineRaggedTensorToTensorShapes() argument
55 while (output_shape->dim_size() < ragged_rank + value_shape.dim_size()) { in CombineRaggedTensorToTensorShapes()
65 if (ragged_rank + value_shape.dim_size() != output_shape->dim_size()) { in CombineRaggedTensorToTensorShapes()
69 ragged_rank + value_shape.dim_size(), in CombineRaggedTensorToTensorShapes()
83 " are incompatible: rt_input.shape[", i + ragged_rank, in CombineRaggedTensorToTensorShapes()
84 "] = ", value_dim.size(), " but shape[", i + ragged_rank, in CombineRaggedTensorToTensorShapes()

1234