make-iterator: Creates an iterator for enumerating the elements of this...

Description Usage Arguments Value Initialization See Also

Description

Creates an iterator for enumerating the elements of this dataset.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15

Arguments

dataset

A dataset

shared_name

(Optional) If non-empty, the returned iterator will be shared under the given name across multiple sessions that share the same devices (e.g. when using a remote server).

output_types

A nested structure of tf$DType objects corresponding to each component of an element of this iterator.

output_shapes

(Optional) A nested structure of tf$TensorShape objects corresponding to each component of an element of this dataset. If omitted, each component will have an unconstrainted shape.

string_handle

A scalar tensor of type string that evaluates to a handle produced by the iterator_string_handle() method.

Value

An Iterator over the elements of this dataset.

Initialization

For make_iterator_one_shot(), the returned iterator will be initialized automatically. A "one-shot" iterator does not currently support re-initialization.

For make_iterator_initializable(), the returned iterator will be in an uninitialized state, and you must run the object returned from iterator_initializer() before using it.

For make_iterator_from_structure(), the returned iterator is not bound to a particular dataset, and it has no initializer. To initialize the iterator, run the operation returned by iterator_make_initializer().

See Also

Other iterator functions: iterator_get_next(), iterator_initializer(), iterator_make_initializer(), iterator_string_handle()


tfdatasets documentation built on Nov. 10, 2021, 1:07 a.m.