• Create a Dataset from an array of elements.

    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));

    Create a Dataset from an array of numbers:

    const a = tf.data.array([4, 5, 6]);
    await a.forEachAsync(e => console.log(e));

    Type Parameters

    Parameters

    • items: T[]

      An array of elements that will be parsed as items in a dataset.

    Returns Dataset<T>

    Doc

Generated using TypeDoc