Performance tips | TensorFlow Datasets
https://www.tensorflow.org/datasets/performances23.12.2021 · This document provides TensorFlow Datasets (TFDS)-specific performance tips. Note that TFDS provides datasets as tf.data.Dataset objects, so the advice from the tf.data guide still applies.. Benchmark datasets. Use tfds.benchmark(ds) to benchmark any tf.data.Dataset object.. Make sure to indicate the batch_size= to normalize the results (e.g. 100 iter/sec -> …
tf.data.Dataset | TensorFlow Core v2.7.0
www.tensorflow.org › api_docs › pythonThe simplest way to create a dataset is to create it from a python list: dataset = tf.data.Dataset.from_tensor_slices ( [1, 2, 3]) for element in dataset: print (element) tf.Tensor (1, shape= (), dtype=int32) tf.Tensor (2, shape= (), dtype=int32) tf.Tensor (3, shape= (), dtype=int32) To process lines from files, use tf.data.TextLineDataset: