Home
last modified time | relevance | path

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

12

/external/tensorflow/tensorflow/python/ops/ragged/
Dragged_const_op_test.py57 ragged_rank=1,
65 ragged_rank=1,
77 ragged_rank=1,
100 dict(pylist=[], ragged_rank=1, expected_shape=(0, None)),
101 dict(pylist=[], ragged_rank=2, expected_shape=(0, None, None)),
105 ragged_rank=1,
110 ragged_rank=2,
113 dict(pylist=[[], [], []], ragged_rank=2, expected_shape=(3, None, None)),
142 ragged_rank=None, argument
163 pylist, dtype=dtype, ragged_rank=ragged_rank, inner_shape=inner_shape)
[all …]
Dragged_factory_ops.py34 def constant(pylist, dtype=None, ragged_rank=None, inner_shape=None, name=None): argument
75 constant_op.constant, pylist, dtype, ragged_rank,
80 def constant_value(pylist, dtype=None, ragged_rank=None, inner_shape=None): argument
131 ragged_rank, inner_shape)
134 def _constant_value(ragged_factory, inner_factory, pylist, dtype, ragged_rank, argument
160 if ragged_rank is not None and ragged_rank != 0:
162 (pylist, ragged_rank))
169 if ragged_rank is not None and ragged_rank < 0:
171 "Invalid ragged_rank=%r: must be nonnegative" % ragged_rank)
182 if inner_shape is not None and ragged_rank is not None:
[all …]
Dragged_constant_value_op_test.py56 ragged_rank=1,
64 ragged_rank=1,
76 ragged_rank=1,
99 dict(pylist=[], ragged_rank=1, expected_shape=(0, None)),
100 dict(pylist=[], ragged_rank=2, expected_shape=(0, None, None)),
104 ragged_rank=1,
109 ragged_rank=2,
112 dict(pylist=[[], [], []], ragged_rank=2, expected_shape=(3, None, None)),
146 ragged_rank=None, argument
152 pylist, dtype=dtype, ragged_rank=ragged_rank, inner_shape=inner_shape)
[all …]
Dragged_batch_gather_op_test.py92 ragged_rank=2),
97 ragged_rank=2)),
112 ragged_rank=1),
114 [[[2, 0], [0, 1]], [[1, 0]]], ragged_rank=1),
116 [[[b'c', b'a'], [b'd', b'e']], [[b'h', b'g']]], ragged_rank=1)),
121 [[['a', 'b', 'c'], ['d']], [['e', 'f']]], ragged_rank=2),
123 [[[2, 0], [0, 0]], [[1, 0]]], ragged_rank=1),
125 [[[b'c', b'a'], [b'd', b'd']], [[b'f', b'e']]], ragged_rank=1)),
131 ragged_rank=1),
133 [[[2, 1, 0], [0]], [[1, 1]]], ragged_rank=2),
[all …]
Dragged_expand_dims_op_test.py67 ragged_rank=0,
72 ragged_rank=0,
77 ragged_rank=0,
86 ragged_rank=2,
91 ragged_rank=2,
96 ragged_rank=2,
101 ragged_rank=2,
106 ragged_rank=2,
115 ragged_rank=None, argument
117 rt = ragged_factory_ops.constant(rt_input, ragged_rank=ragged_rank)
Dragged_array_ops.py136 data, ragged_rank=mask.ragged_rank)
140 mask.nested_row_splits, data.nested_row_splits[:mask.ragged_rank]
196 mask, ragged_rank=min(data.ragged_rank, mask.shape.ndims - 1))
297 ragged_rank = rt_input.ragged_rank
306 for axis in range(ragged_rank, 0, -1):
327 inner_repeats = array_ops.concat([multiples[:1], multiples[ragged_rank + 1:]],
356 ragged_rank = rt_input.ragged_rank
363 projected_splits = [{i: nested_splits[i]} for i in range(ragged_rank)]
364 for src_axis in range(ragged_rank):
365 for dst_axis in range(src_axis + 1, ragged_rank - 1):
[all …]
Dragged_from_tensor_op_test.py311 ragged_rank=1, argument
315 rt = RaggedTensor.from_tensor(dt, lengths, padding, ragged_rank)
319 self.assertEqual(rt.ragged_rank, ragged_rank)
330 for ragged_rank in range(1, 4):
331 rt = RaggedTensor.from_tensor(dt, ragged_rank=ragged_rank)
333 self.assertEqual(rt.ragged_rank, ragged_rank)
445 self.assertEqual(rt.ragged_rank, 1)
501 ragged_rank=1, argument
505 lengths, padding, ragged_rank)
Dragged_map_fn_op_test.py74 dtype=dtypes.int64, ragged_rank=1),
83 dtype=dtypes.int64, ragged_rank=1),
92 dtype=dtypes.int64, ragged_rank=2),
100 dtype=dtypes.int64, ragged_rank=2),
108 dtype=dtypes.int64, ragged_rank=1),
116 dtype=dtypes.int64, ragged_rank=1),
131 dtype=dtypes.int64, ragged_rank=1),
140 dtype=dtypes.int64, ragged_rank=2),
149 dtype=dtypes.int64, ragged_rank=4),
170 expected_output, ragged_rank=expected_ragged_rank)
[all …]
Dragged_row_lengths_op_test.py61 ragged_rank=1,
65 ragged_rank=1,
72 ragged_rank=1,
77 ragged_rank=1,
82 ragged_rank=1,
119 ragged_rank=None, argument
121 rt = ragged_factory_ops.constant(rt_input, ragged_rank=ragged_rank)
126 self.assertEqual(lengths.ragged_rank, expected_ragged_rank)
Dragged_concat_ops.py172 rt_inputs[i], ragged_rank=1)
175 ragged_rank = max(max(rt.ragged_rank for rt in rt_inputs), 1)
176 rt_inputs = [_increase_ragged_rank_to(rt, ragged_rank) for rt in rt_inputs]
209 ragged_rank = rt_inputs[0].ragged_rank
213 for dim in range(ragged_rank)
284 def _increase_ragged_rank_to(rt_input, ragged_rank): argument
286 if ragged_rank > 0:
289 if rt_input.ragged_rank < ragged_rank:
291 _increase_ragged_rank_to(rt_input.values, ragged_rank - 1))
Dragged_to_tensor_op_test.py100 ragged_rank=None, argument
103 rt = ragged_factory_ops.constant(rt_input, ragged_rank=ragged_rank)
131 def testError(self, rt_input, default, error, ragged_rank=None): argument
132 rt = ragged_factory_ops.constant(rt_input, ragged_rank=ragged_rank)
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_tile_op_test.py96 ragged_rank=1,
103 ragged_rank=1,
109 ragged_rank=1,
192 ragged_rank=None): argument
193 rt = ragged_factory_ops.constant(rt_input, ragged_rank)
208 self.assertEqual(tiled.ragged_rank, rt.ragged_rank)
Dragged_gather_nd_op_test.py95 ragged_rank=1,
99 ragged_rank=1)),
121 indices=ragged_factory_ops.constant_value([[[0]]], ragged_rank=1),
123 [[[[b'a']]]], ragged_rank=1)),
154 ragged_rank=1),
163 ragged_rank=1),
173 ragged_rank=1),
191 ragged_rank=1),
199 ragged_rank=2),
Dragged_boolean_mask_op_test.py118 ragged_rank=1)),
181 ragged_rank=1),
186 ragged_rank=1)),
191 ragged_rank=1),
231 ragged_rank=1)),
237 ragged_rank=1),
263 ragged_rank=1),
268 ragged_rank=1)),
273 ragged_rank=1),
278 ragged_rank=1)),
[all …]
Dragged_dispatch_test.py147 self.assertEqual(x.ragged_rank, y.ragged_rank)
168 [[-2, 3], [-3]], ragged_rank=1)},
173 ragged_rank=1)},
176 ragged_rank=2)},
279 ragged_rank=1),
282 ragged_rank=1)},
319 ragged_rank=1),
322 ragged_rank=1),
326 ragged_rank=1),
329 ragged_rank=1),
[all …]
Dragged_tensor.py656 def ragged_rank(self): member in RaggedTensor
664 return self._values.ragged_rank + 1 if values_is_ragged else 1
1050 ragged_rank=1, argument
1108 if not isinstance(ragged_rank, int):
1109 raise TypeError("ragged_rank expected int, got %r" % ragged_rank)
1110 if ragged_rank <= 0:
1112 "ragged_rank must be greater than 0; got %s" % ragged_rank)
1116 tensor.shape.with_rank_at_least(ragged_rank + 1)
1125 if ragged_rank > 1:
1128 constant_op.constant([-1], dtypes.int64), input_shape[ragged_rank:]
[all …]
Dragged_tensor_shape_test.py69 [[['a', 'b', 'c'], ['d', 'e', 'f']]], ragged_rank=1),
73 [[[[1], [2]], [[3], [4]]], [[[5], [6]]]], ragged_rank=1),
85 ragged_rank=1),
406 ragged_rank=1)),
413 ragged_rank=2)),
453 ragged_rank=1),
463 ragged_rank=1),
467 ragged_rank=1)),
472 [[[[1], [2]], [[3], [4]]], [[[5], [6]]]], ragged_rank=1),
Dragged_map_ops.py411 nested_row_lengths=tuple(dtypes.int64 for i in range(d.ragged_rank - 1)),
424 if declared.ragged_rank != current.ragged_rank + 1:
427 (declared.ragged_rank, current.ragged_rank))
432 if declared.ragged_rank != 1:
435 declared.ragged_rank)
Dragged_to_sparse_op_test.py59 ragged_rank=1)
72 ragged_rank=1)
97 ragged_rank=2)
129 ragged_rank=1)
186 [[[[1.0, 2.0], [3.0, 4.0]], [[5.0, 6.0]]]], ragged_rank=2)
188 [[[[9.0, 8.0], [7.0, 6.0]], [[5.0, 4.0]]]], ragged_rank=2)
Dragged_size_op_test.py43 def testRaggedSize(self, test_input, size, ragged_rank=None): argument
44 input_rt = ragged_factory_ops.constant(test_input, ragged_rank=ragged_rank)
Dragged_eager_test.py35 dict(pylist=[[[1, 2], [3, 4]], [[5, 6], [], [7, 8]]], ragged_rank=1),
37 def testRaggedTensorToList(self, pylist, ragged_rank=None): argument
38 rt = ragged_factory_ops.constant(pylist, ragged_rank)
Dragged_test_util.py55 a_ragged_rank = a.ragged_rank if ragged_tensor.is_ragged(a) else 0
56 b_ragged_rank = b.ragged_rank if ragged_tensor.is_ragged(b) else 0
65 a_ragged_rank = a.ragged_rank if ragged_tensor.is_ragged(a) else 0
66 b_ragged_rank = b.ragged_rank if ragged_tensor.is_ragged(b) else 0
Dragged_string_ops.py82 elif input_tensor.ragged_rank > 1:
359 input, ragged_rank=input_ndims - 1)
360 elif input.ragged_rank < input_ndims - 1:
364 ragged_rank=input_ndims - input.ragged_rank + 1))
/external/tensorflow/tensorflow/python/kernel_tests/
Dunicode_decode_op_test.py132 def testBasicDecode(self, texts, ragged_rank=None): argument
134 _nested_encode(texts, "UTF-8"), ragged_rank=ragged_rank, dtype=bytes)
148 def testBasicDecodeWithOffsets(self, texts, ragged_rank=None): argument
150 _nested_encode(texts, "UTF-8"), ragged_rank=ragged_rank, dtype=bytes)
205 ragged_rank=0),
223 def testDecodeWithPaddedOutput(self, texts, expected, ragged_rank=None): argument
225 _nested_encode(texts, "UTF-8"), ragged_rank=ragged_rank, dtype=bytes)
464 def testBasicSplit(self, texts, ragged_rank=None): argument
466 _nested_encode(texts, "UTF-8"), ragged_rank=ragged_rank, dtype=bytes)
480 def testBasicSplitWithOffsets(self, texts, ragged_rank=None): argument
[all …]

12