Tensorflow.js tf.data.Dataset.skip() Method Last Updated : 21 Jun, 2021 Comments Improve Suggest changes Like Article Like Report Tensorflow.js is an open-source library that is being developed by Google for running machine learning models as well as deep learning neural networks in the browser or node environment. The tf.data.Dataset.skip() method is used to create a dataset that skips count initial elements from this dataset. Syntax: skip(count) Parameters: This method has as single parameter as mentioned above and described below: count: It is a tensor input where the number of element of this dataset that should be skipped to form the new dataset. When the count is greater than the size of this dataset, the new dataset will contain no elements. When the count is undefined or negative, it skips the entire dataset. Return Value: It returns the tf.data.Dataset. The below examples demonstrate the tf.data.Dataset.skip() method: Example 1: JavaScript // Importing the tensorflow.js library import * as tf from "@tensorflow/tfjs" // Defining input elements const a = tf.data.array([4, 5, 6, 7, 8, 9]).skip(3); await a.forEachAsync(e => console.log(e)); Output: 7 8 9 Example 2: JavaScript // Importing the tensorflow.js library import * as tf from "@tensorflow/tfjs" // Defining input elements const a = tf.data.array([4, 5, 6, 7, 8, 9]).skip(4); await a.forEachAsync(e => console.log(e)); Output: 8 9 Reference: https://js.tensorflow.org/api/latest/#tf.data.Dataset.skip Comment More infoAdvertise with us Next Article Tensorflow.js tf.data.Dataset.skip() Method A arorakashish0911 Follow Improve Article Tags : JavaScript Web Technologies Tensorflow.js Similar Reads Tensorflow.js tf.data.Dataset class .take() Method Tensorflow.js is an open-source library that is developed by Google for running machine learning models as well as deep learning neural networks in the browser or node environment. The .take() method is used to form a dataset with maximum count foremost items out of the stated dataset. Syntax: take( 2 min read Tensorflow.js tf.data.array() Method Tensorflow.js is an open-source library that is developed by Google for running machine learning models as well as deep learning neural networks in the browser or node environment. The .data.array() method is used to form a dataset based on an array made from elements. Syntax : Â tf.data.array(items 2 min read Tensorflow.js tf.data.Dataset class .prefetch() Method Tensorflow.js is an open-source library developed by Google for running machine learning models and deep learning neural networks in the browser or node environment. The tf.data.Dataset class .prefetch() function is used to produce a dataset that prefetches the specified elements from this given dat 2 min read Tensorflow.js tf.data.Dataset.skip() Function Tensorflow.js is an open-source library developed by Google for running machine learning models and deep learning neural networks in the browser or node environment. It also helps the developers to develop ML models in JavaScript language and can use ML directly in the browser or in Node.js. The tf. 1 min read Tensorflow.js tf.data.Dataset class .batch() Method Tensorflow.js is an open-source library developed by Google for running machine learning models and deep learning neural networks in the browser or node environment. It also helps the developers to develop ML models in JavaScript language and can use ML directly in the browser or in Node.js. The tf. 2 min read Like