MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / concatenate

Method concatenate

tensorflow/python/data/ops/dataset_ops.py:799–821  ·  view source on GitHub ↗

Creates a `Dataset` by concatenating the given dataset with this dataset. ```python a = Dataset.range(1, 4) # ==> [ 1, 2, 3 ] b = Dataset.range(4, 8) # ==> [ 4, 5, 6, 7 ] # The input dataset and dataset to be concatenated should have the same # nested structures and output ty

(self, dataset)

Source from the content-addressed store, hash-verified

797 return ZipDataset(datasets)
798
799 def concatenate(self, dataset):
800 """Creates a `Dataset` by concatenating the given dataset with this dataset.
801
802 ```python
803 a = Dataset.range(1, 4) # ==> [ 1, 2, 3 ]
804 b = Dataset.range(4, 8) # ==> [ 4, 5, 6, 7 ]
805
806 # The input dataset and dataset to be concatenated should have the same
807 # nested structures and output types.
808 # c = Dataset.range(8, 14).batch(2) # ==> [ [8, 9], [10, 11], [12, 13] ]
809 # d = Dataset.from_tensor_slices([14.0, 15.0, 16.0])
810 # a.concatenate(c) and a.concatenate(d) would result in error.
811
812 a.concatenate(b) # ==> [ 1, 2, 3, 4, 5, 6, 7 ]
813 ```
814
815 Args:
816 dataset: `Dataset` to be concatenated.
817
818 Returns:
819 Dataset: A `Dataset`.
820 """
821 return ConcatenateDataset(self, dataset)
822
823 def prefetch(self, buffer_size):
824 """Creates a `Dataset` that prefetches elements from this dataset.

Callers 15

_calibrateFunction · 0.45
_transpose_batch_timeFunction · 0.45
_transpose_batch_timeFunction · 0.45
_transpose_batch_timeFunction · 0.45
_transpose_batch_timeFunction · 0.45
_process_outputsMethod · 0.45
pad_and_reverse_word_idsFunction · 0.45
__iter__Method · 0.45
exportMethod · 0.45
_dopri5Function · 0.45
integrateMethod · 0.45

Calls 1

ConcatenateDatasetClass · 0.70

Tested by 15

testWithWeightsMethod · 0.36
np_matrix_to_tf_sparseFunction · 0.36
testCompareToBijectorMethod · 0.36
testEntropyMethod · 0.36
actual_mvn_log_probMethod · 0.36
_testMVNMethod · 0.36
make_wishartMethod · 0.36
log_probMethod · 0.36