/external/tensorflow/tensorflow/python/ops/ragged/ |
D | row_partition.py | 114 row_lengths=None, argument 166 for tensor in [row_lengths, value_rowids, nrows]: 172 self._row_lengths = row_lengths 284 row_lengths = bincount_ops.bincount( 289 row_splits = array_ops.concat([[0], math_ops.cumsum(row_lengths)], axis=0) 291 row_lengths.set_shape([const_nrows]) 296 row_lengths=row_lengths, 356 def from_row_lengths(cls, row_lengths, validate=True, preferred_dtype=None): argument 380 with ops.name_scope(None, "RowPartitionFromRowLengths", [row_lengths]): 381 row_lengths = cls._convert_row_partition(row_lengths, "row_lengths", [all …]
|
D | segment_id_ops.py | 70 row_lengths = splits[1:] - splits[:-1] 73 return ragged_util.repeat(indices, repeats=row_lengths, axis=0) 124 row_lengths = bincount_ops.bincount( 129 splits = array_ops.concat([[0], math_ops.cumsum(row_lengths)], axis=0)
|
D | ragged_batch_gather_with_default_op.py | 108 row_lengths = ragged_array_ops.expand_dims( 109 params.row_lengths(axis=num_batch_dimensions), 111 upper_bounds = math_ops.cast(row_lengths, indices.dtype)
|
D | row_partition_test.py | 52 rt2 = RowPartition.from_row_lengths(row_lengths=[4, 0, 3, 1, 0]) 99 row_lengths=[2, 3, 4], 237 row_lengths = constant_op.constant([2, 0, 3, 1, 1], dtypes.int64) 239 rp = RowPartition.from_row_lengths(row_lengths, validate=False) 242 rp_row_lengths = rp.row_lengths() 245 self.assertIs(rp_row_lengths, row_lengths) # nrows 247 self.assertAllEqual(rp_row_lengths, row_lengths) 575 self.assertAllEqual(r.row_lengths(), result.row_lengths()) 883 test_class.assertAllEqual(actual.row_lengths(), expected.row_lengths())
|
D | ragged_row_lengths_op_test.py | 121 lengths = rt.row_lengths(axis) 142 rt.row_lengths(axis)
|
D | ragged_tensor_test.py | 78 rt2 = RaggedTensor.from_row_lengths(values, row_lengths=[4, 0, 3, 1, 0]) 364 row_lengths = constant_op.constant([2, 0, 3, 1, 1], dtypes.int64) 366 rt = RaggedTensor.from_row_lengths(values, row_lengths, validate=False) 372 rt_row_lengths = rt.row_lengths() 376 self.assertIs(rt_row_lengths, row_lengths) # cached_nrows 378 self.assertAllEqual(rt_row_lengths, row_lengths) 387 self.assertAllEqual([2, 1, 0], rt2.row_lengths()) 669 self.assertAllEqual(rt.row_lengths(), [2, 0, 3, 1, 1]) 679 row_lengths = constant_op.constant([2, 0, 3, 1, 1]) 682 rt3 = RaggedTensor.from_row_lengths(values, row_lengths) [all …]
|
D | ragged_tensor_supported_values_test.py | 177 row_lengths = constant_op.constant([2, 0, 3, 1, 2], dtypes.int64) 178 rt = RaggedTensor.from_row_lengths(values, row_lengths) 181 self.assertAllEqual(rt.row_lengths(), row_lengths)
|
D | ragged_math_ops.py | 540 row_lengths = rt_input.row_splits[1:] - rt_input.row_splits[:-1] 541 num_segments = math_ops.maximum(math_ops.reduce_max(row_lengths), 0) 542 segment_ids = range(row_lengths).values
|
D | ragged_tensor.py | 454 def from_row_lengths(cls, values, row_lengths, name=None, validate=True): argument 488 with ops.name_scope(name, "RaggedFromRowLengths", [values, row_lengths]): 490 row_lengths=row_lengths, 1176 def row_lengths(self, axis=1, name=None): member in RaggedTensor 1207 return self._row_partition.row_lengths() 1218 return self.with_values(self.values.row_lengths(axis - 1)) 1242 rt_nested_row_lengths.append(rt.row_lengths()) 1284 return math_ops.maximum(math_ops.reduce_max(self.row_lengths()), 0)
|
D | ragged_gather_ops.py | 227 array_ops.repeat(indices, params.row_lengths(), 0)) 236 math_ops.range(params.nrows()), params.row_lengths())), 0, 0)
|
/external/tensorflow/tensorflow/python/distribute/ |
D | input_lib_type_spec_test.py | 348 row_lengths = np.mod(np.arange(20), 4).astype(np.int64) 350 np.repeat(np.arange(20, dtype=np.float32), row_lengths), row_lengths) 409 row_lengths = np.mod(np.arange(20), 4).astype(np.int64) 411 np.repeat(np.arange(20, dtype=np.float32), row_lengths), row_lengths) 471 row_lengths = np.mod(np.arange(50), 4).astype(np.int64) 473 np.repeat(np.arange(50, dtype=np.float32), row_lengths), row_lengths)
|
D | input_lib_test.py | 1048 row_lengths = np.mod(np.arange(20), 4).astype(np.int64) 1050 np.repeat(np.arange(20, dtype=np.float32), row_lengths), row_lengths) 1169 row_lengths = np.mod(np.arange(20), 4).astype(np.int64) 1171 np.repeat(np.arange(20, dtype=np.float32), row_lengths), row_lengths) 1217 row_lengths = np.mod(np.arange(20), 4).astype(np.int64) 1219 np.repeat(np.arange(20, dtype=np.float32), row_lengths), row_lengths)
|
/external/tensorflow/tensorflow/python/keras/layers/ |
D | recurrent_v2.py | 424 inputs, row_lengths = K.convert_inputs_if_ragged(inputs) 425 is_ragged_input = (row_lengths is not None) 454 input_length=row_lengths if row_lengths is not None else timesteps, 461 inputs, initial_state, training, mask, row_lengths) 468 output = K.maybe_convert_to_ragged(is_ragged_input, outputs, row_lengths) 1150 inputs, row_lengths = K.convert_inputs_if_ragged(inputs) 1151 is_ragged_input = (row_lengths is not None) 1181 input_length=row_lengths if row_lengths is not None else timesteps, 1216 row_lengths, 1243 row_lengths [all …]
|
D | wrappers.py | 219 inputs, row_lengths = K.convert_inputs_if_ragged(inputs) 220 is_ragged_input = row_lengths is not None 233 input_length=row_lengths[0] if is_ragged_input else input_length, 239 row_lengths), outputs)
|
/external/tflite-support/tensorflow_lite_support/custom_ops/kernel/ |
D | ngrams_test.cc | 122 std::vector<int64_t> row_lengths; in ExtractRowLengthsTensorVector() local 123 row_lengths.reserve(row_splits.size() - 1); in ExtractRowLengthsTensorVector() 127 row_lengths.push_back(tail - head); in ExtractRowLengthsTensorVector() 130 return row_lengths; in ExtractRowLengthsTensorVector()
|
/external/tensorflow/tensorflow/python/tpu/ |
D | tpu_embedding_v2_cpu_test.py | 177 reduced[-1] /= np.expand_dims(ragged.row_lengths().numpy(), axis=1) 222 row_lengths=self.feature_watched_row_lengths) 225 row_lengths=self.feature_favorited_row_lengths) 228 row_lengths=self.feature_friends_row_lengths)
|
/external/tensorflow/tensorflow/tools/api/golden/v1/ |
D | tensorflow.-ragged-tensor.pbtxt | 65 …argspec: "args=[\'cls\', \'values\', \'row_lengths\', \'name\', \'validate\'], varargs=None, keywo… 120 name: "row_lengths"
|
/external/tensorflow/tensorflow/tools/api/golden/v2/ |
D | tensorflow.-ragged-tensor.pbtxt | 65 …argspec: "args=[\'cls\', \'values\', \'row_lengths\', \'name\', \'validate\'], varargs=None, keywo… 120 name: "row_lengths"
|
/external/tflite-support/tensorflow_lite_support/cc/text/tokenizers/ |
D | bert_tokenizer.cc | 87 result.row_lengths.emplace_back(num_word_pieces); in TokenizeWordpiece()
|
D | bert_tokenizer.h | 56 std::vector<int> row_lengths; member
|
/external/tensorflow/tensorflow/python/data/experimental/kernel_tests/ |
D | rebatch_dataset_test.py | 540 row_lengths = np.random.randint(8, size=128) 541 values = np.random.normal(size=np.sum(row_lengths)).astype(np.float32) 543 ragged_tensor.RaggedTensor.from_row_lengths(values, row_lengths)) 554 for batch_row_lengths in row_lengths.reshape((-1, 4)):
|
/external/libtextclassifier/native/utils/ |
D | bert_tokenizer.h | 53 std::vector<int> row_lengths; member
|
/external/tensorflow/tensorflow/python/ops/ |
D | parsing_config.py | 852 rt.row_starts(), partition_t.row_lengths()) 858 rt.row_starts(), partition_t.row_lengths()) 870 math_ops.cumsum(nrows, exclusive=True), partition_t.row_lengths())
|
/external/tensorflow/tensorflow/python/keras/engine/ |
D | ragged_keras_tensor_test.py | 213 inp, row_lengths=[4, 0, 3, 1, 0]) 218 x, row_lengths=[4, 0, 3, 1, 0])
|
/external/tensorflow/tensorflow/python/data/kernel_tests/ |
D | map_test.py | 825 row_lengths = np.random.randint(0, 4, size=128) 826 values = np.ones(np.sum(row_lengths)) 828 values, row_lengths).to_sparse() 836 row_lengths = np.random.randint(0, 4, size=128) 837 values = np.ones(np.sum(row_lengths)) 839 values, row_lengths).to_sparse()
|