/external/tensorflow/tensorflow/python/ops/ragged/ |
D | row_partition.py | 115 row_splits, argument 160 if not isinstance(row_splits, ops.Tensor): 162 row_splits) 163 if row_splits.dtype not in (dtypes.int32, dtypes.int64): 167 row_splits.shape.assert_has_rank(1) 168 row_splits.set_shape([None]) 169 self._row_splits = row_splits 178 elif tensor.dtype != row_splits.dtype: 299 row_splits = array_ops.concat([[0], math_ops.cumsum(row_lengths)], axis=0) 302 row_splits.set_shape([const_nrows + 1]) [all …]
|
D | ragged_tensor_value.py | 35 def __init__(self, values, row_splits): argument 42 if not (isinstance(row_splits, (np.ndarray, np.generic)) and 43 row_splits.dtype in (np.int64, np.int32) and row_splits.ndim == 1): 48 row_splits.dtype != values.row_splits.dtype): 52 self._row_splits = row_splits 54 row_splits = property( variable in RaggedTensorValue 75 rt_nested_splits = [self.row_splits] 78 rt_nested_splits.append(rt_values.row_splits)
|
D | row_partition_test.py | 40 row_splits=constant_op.constant([0, 3, 8], dtype=dtypes.int64), 54 rp = RowPartition.from_row_splits(row_splits=[0, 4, 4, 7, 8, 8]) 55 self.assertAllEqual(rp.row_splits(), [0, 4, 4, 7, 8, 8]) 59 rt1 = RowPartition.from_row_splits(row_splits=[0, 4, 4, 7, 8, 8]) 66 self.assertAllEqual(rp.row_splits(), [0, 4, 4, 7, 8, 8]) 70 inner_rt = RowPartition.from_row_splits(row_splits=[0, 4, 4, 7, 8, 8]) 71 outer_rt = RowPartition.from_row_splits(row_splits=[0, 3, 3, 5]) 79 row_splits = constant_op.constant([0, 2, 2, 5, 6, 7], dtypes.int64) 81 row_splits=row_splits, 83 self.assertAllEqual(rp.row_splits(), [0, 2, 2, 5, 6, 7]) [all …]
|
D | ragged_factory_ops.py | 76 def ragged_factory(values, row_splits): argument 77 row_splits = constant_op.constant(row_splits, dtype=row_splits_dtype) 78 return ragged_tensor.RaggedTensor.from_row_splits(values, row_splits, 135 def _ragged_factory(values, row_splits): argument 136 row_splits = np.array(row_splits, dtype=row_splits_dtype) 137 return ragged_tensor_value.RaggedTensorValue(values, row_splits) 240 for row_splits in reversed(nested_splits): 241 values = ragged_factory(values, row_splits) 362 row_splits = array_ops.placeholder(dtypes.int64, [None], 364 result = ragged_tensor.RaggedTensor.from_row_splits(result, row_splits,
|
D | ragged_getitem.py | 139 nsplits = tensor_shape.dimension_at_index(inner_rt.row_splits.shape, 0) 143 nsplits = array_ops.shape(inner_rt.row_splits, 144 out_type=inner_rt.row_splits.dtype)[0] 165 starts = rt_input.row_splits[:-1] 166 limits = rt_input.row_splits[1:] 206 new_starts = rt_input.row_splits[:-1][row_key] 207 new_limits = rt_input.row_splits[1:][row_key] 208 zero_pad = array_ops.zeros([1], rt_input.row_splits.dtype) 262 nsplits = tensor_shape.dimension_at_index(inner_rt.row_splits.shape, 0) 266 nsplits = array_ops.shape(inner_rt.row_splits, [all …]
|
D | ragged_tensor_test.py | 73 values=[3, 1, 4, 1, 5, 9, 2, 6], row_splits=[0, 4, 4, 7, 8, 8]) 79 rt1 = RaggedTensor.from_row_splits(values, row_splits=[0, 4, 4, 7, 8, 8]) 91 values=[3, 1, 4, 1, 5, 9, 2, 6], row_splits=[0, 4, 4, 7, 8, 8]) 93 values=inner_rt, row_splits=[0, 3, 3, 5]) 108 values=array_ops.ones([5, 3]), row_splits=[0, 2, 5]) 125 self.assertEqual(rt_value.row_splits.dtype, np.int64) 128 self.assertAllEqual(splits, rt_value.row_splits) 136 row_splits=splits2) 137 self.assertEqual(rt_value.row_splits.dtype, np.int64) 140 self.assertAllEqual(splits2, rt_value.row_splits) [all …]
|
D | ragged_to_sparse_op_test.py | 143 row_splits=[2, 3], values=[1, 2, 3], validate=False) 149 row_splits=[0, 5], values=empty_vector, validate=False) 151 row_splits=[0, 1], 153 row_splits=[0, 5], values=empty_vector, validate=False), 162 row_splits=[0, 5], 164 row_splits=[0], values=empty_vector, validate=False), 172 row_splits=empty_vector, values=[], validate=False)
|
D | ragged_tensor.py | 413 def from_row_splits(cls, values, row_splits, name=None, validate=True): argument 452 with ops.name_scope(name, "RaggedFromRowSplits", [values, row_splits]): 454 row_splits=row_splits, 999 def row_splits(self): member in RaggedTensor 1019 return self._row_partition.row_splits() 1101 rt_nested_splits = [self.row_splits] 1104 rt_nested_splits.append(rt_values.row_splits) 1287 splits = self.row_splits 1361 splits_shape = array_ops.shape(self.row_splits, out_type=out_type) 1401 self._row_partition.dtype != new_values.row_splits.dtype): [all …]
|
D | ragged_gather_ops.py | 163 indices_shape = array_ops.shape(indices, out_type=params.row_splits.dtype) 204 params, ragged_rank=1, row_splits_dtype=indices.row_splits.dtype) 211 indices, ragged_rank=1, row_splits_dtype=params.row_splits.dtype) 229 params, ragged_rank=1, row_splits_dtype=indices.row_splits.dtype) 270 params, ragged_rank=1, row_splits_dtype=indices.row_splits.dtype) 420 row_splits_dtype=params.row_splits.dtype) 455 indices = math_ops.cast(indices, params.row_splits.dtype) 458 flattened_index_tuples = array_ops.gather(params.row_splits, 504 for row_splits in param_nested_splits[1:]: 505 combined_splits = array_ops.gather(row_splits, combined_splits)
|
D | ragged_tensor_supported_values_test.py | 131 row_splits = constant_op.constant([0, 2, 2, 5, 6, 8], dtypes.int64) 132 rt = RaggedTensor.from_row_splits(values, row_splits) 135 self.assertAllEqual(rt.row_splits, row_splits) 479 row_splits = constant_op.constant([0, 2, 2, 5, 6, 8], dtypes.int64) 481 rt = RaggedTensor.from_row_splits(values, row_splits) 500 rt = RaggedTensor.from_row_splits(values, row_splits) 511 rt = RaggedTensor.from_row_splits(values, row_splits) 518 row_splits = constant_op.constant([0, 2, 3, 3, 3], dtypes.int32) 519 rt = RaggedTensor.from_row_splits(values, row_splits)
|
D | ragged_math_ops.py | 222 segment_ids.row_splits, 223 data.row_splits, 231 data_row_lengths = data.row_splits[1:] - data.row_splits[:-1] 582 row_lengths = rt_input.row_splits[1:] - rt_input.row_splits[:-1] 592 num_segments = array_ops.shape(rt_input.row_splits)[0] - 1 594 rt_input.row_splits) 889 check_ops.assert_equal(a.row_splits, b.row_splits, message=shape_err) 979 a.row_splits.dtype 980 if isinstance(a, ragged_tensor.RaggedTensor) else b.row_splits.dtype) 1189 params=last_rp.row_splits(), indices=last_rp.value_rowids() + 1) - 1 [all …]
|
D | ragged_conversion_ops.py | 173 row_splits = 0 if ragged_rank == 0 else op.inputs[0] 176 row_splits=row_splits,
|
D | ragged_array_ops.py | 119 row_splits_dtype=mask.row_splits.dtype) 133 splits.append(mask.row_splits) 167 segment_ids = segment_id_ops.row_splits_to_segment_ids(data.row_splits) 180 row_splits_dtype=data.row_splits.dtype) 245 multiples, name='multiples', dtype=input.row_splits.dtype) 616 data.row_splits.dtype 668 data.row_splits, 669 partitions.row_splits, 843 t.row_splits.dtype == dtypes.int32 for t in ragged_inputs): 855 ragged_row_splits=[rt.row_splits for rt in ragged_inputs],
|
/external/tflite-support/tensorflow_lite_support/custom_ops/kernel/ |
D | ngrams_test.cc | 83 std::vector<int64_t> row_splits; in NgramsModel() local 84 row_splits.reserve(nested_row_lengths[i].size() + 1); in NgramsModel() 86 row_splits.push_back(index); in NgramsModel() 89 row_splits.push_back(index); in NgramsModel() 91 PopulateTensor(input_row_splits_[i], row_splits); in NgramsModel() 120 std::vector<int64_t> row_splits = in ExtractRowLengthsTensorVector() local 123 row_lengths.reserve(row_splits.size() - 1); in ExtractRowLengthsTensorVector() 124 int64_t head = row_splits[0]; in ExtractRowLengthsTensorVector() 125 for (int i = 1; i < row_splits.size(); ++i) { in ExtractRowLengthsTensorVector() 126 int64_t tail = row_splits[i]; in ExtractRowLengthsTensorVector()
|
D | whitespace_tokenizer.cc | 126 TfLiteTensor* row_splits = nested_row_splits[i]; in WriteRaggedOutput() local 127 for (int j = 0; j < SizeOfDimension(row_splits, 0); ++j) { in WriteRaggedOutput() 128 row_splits->data.i64[j] = j * row_splits_step; in WriteRaggedOutput() 133 TfLiteTensor* row_splits = nested_row_splits.back(); in WriteRaggedOutput() local 139 row_splits->data.i64[row_splits_index] = token_index; in WriteRaggedOutput() 146 row_splits->data.i64[row_splits_index] = token_index; in WriteRaggedOutput() 173 TfLiteTensor* row_splits = in Prepare() local 176 context->ResizeTensor(context, row_splits, row_splits_shape)); in Prepare()
|
/external/tensorflow/tensorflow/core/api_def/base_api/ |
D | api_def_UnicodeDecodeWithOffsets.pbtxt | 11 name: "row_splits" 73 The `row_splits` tensor indicates where the codepoints and start offsets for 77 `[row_splits[i]:row_splits[i+1]]`. Thus: 79 * `char_values[row_splits[i]+j]` is the Unicode codepoint for the `j`th 81 * `char_to_bytes_starts[row_splits[i]+j]` is the start byte offset for the `j`th 83 * `row_splits[i+1] - row_splits[i]` is the number of characters in the `i`th
|
D | api_def_UnicodeDecode.pbtxt | 11 name: "row_splits" 64 The `row_splits` tensor indicates where the codepoints for 68 `[row_splits[i]:row_splits[i+1]]`. Thus: 70 * `char_values[row_splits[i]+j]` is the Unicode codepoint for the `j`th 72 * `row_splits[i+1] - row_splits[i]` is the number of characters in the `i`th
|
/external/tensorflow/tensorflow/core/ops/ |
D | ragged_array_ops.cc | 98 ShapeHandle row_splits = c->input(i + ragged_splits_start); in __anon8359b0a00102() local 99 if (!c->Merge(out_splits, row_splits, &out_splits).ok()) { in __anon8359b0a00102() 118 ShapeHandle row_splits = c->Vector(batch_size + 1); in __anon8359b0a00102() local 119 if (!c->Merge(out_splits, row_splits, &out_splits).ok()) { in __anon8359b0a00102()
|
/external/tensorflow/tensorflow/python/ops/ |
D | bincount_ops.py | 205 splits=arr.row_splits, 437 values.row_splits, 520 if weights.row_splits is not values.row_splits: 523 weights.row_splits, 524 values.row_splits,
|
/external/tflite-support/tensorflow_lite_support/custom_ops/python/ |
D | sentencepiece_tokenizer.py | 73 (output_values, row_splits) = ( 79 nested_row_splits=[row_splits], 112 input_tensor.row_splits)
|
/external/tensorflow/tensorflow/tools/api/golden/v1/ |
D | tensorflow.ragged.-ragged-tensor-value.pbtxt | 22 name: "row_splits" 35 … argspec: "args=[\'self\', \'values\', \'row_splits\'], varargs=None, keywords=None, defaults=None"
|
D | tensorflow.experimental.-row-partition.pbtxt | 24 …argspec: "args=[\'self\', \'row_splits\', \'row_lengths\', \'value_rowids\', \'nrows\', \'uniform_… 36 …argspec: "args=[\'cls\', \'row_splits\', \'validate\', \'dtype\', \'dtype_hint\'], varargs=None, k… 75 name: "row_splits"
|
/external/tensorflow/tensorflow/core/ops/compat/ops_history_v1/ |
D | UnicodeDecode.pbtxt | 8 name: "row_splits" 55 name: "row_splits"
|
/external/tensorflow/tensorflow/core/ops/compat/ops_history_v2/ |
D | UnicodeDecode.pbtxt | 8 name: "row_splits" 55 name: "row_splits"
|
/external/tensorflow/tensorflow/tools/api/golden/v2/ |
D | tensorflow.experimental.-row-partition.pbtxt | 24 …argspec: "args=[\'self\', \'row_splits\', \'row_lengths\', \'value_rowids\', \'nrows\', \'uniform_… 36 …argspec: "args=[\'cls\', \'row_splits\', \'validate\', \'dtype\', \'dtype_hint\'], varargs=None, k… 75 name: "row_splits"
|