Create a Dataset from an array of elements.
Dataset
Create a Dataset from an array of objects:
const a = tf.data.array([{'item': 1}, {'item': 2}, {'item': 3}]);await a.forEachAsync(e => console.log(e)); Copy
const a = tf.data.array([{'item': 1}, {'item': 2}, {'item': 3}]);await a.forEachAsync(e => console.log(e));
Create a Dataset from an array of numbers:
const a = tf.data.array([4, 5, 6]);await a.forEachAsync(e => console.log(e)); Copy
const a = tf.data.array([4, 5, 6]);await a.forEachAsync(e => console.log(e));
An array of elements that will be parsed as items in a dataset.
Generated using TypeDoc
Create a
Dataset
from an array of elements.Create a Dataset from an array of objects:
Create a Dataset from an array of numbers: