TensorFlow 2.0 Beta is available Learn more

tfds.core.SplitGenerator

Class SplitGenerator

Defines the split information for the generator.

View source

This should be used as returned value of GeneratorBasedBuilder._split_generators. See GeneratorBasedBuilder._split_generators for more info and example of usage.

__init__

View source

__init__(
    name,
    num_shards=1,
    gen_kwargs=None
)

Constructs a SplitGenerator.

Args:

  • name: str, name of the Split for which the generator will create the examples.
  • num_shards: int, number of shards between which the generated examples will be written.
  • gen_kwargs: dict, kwargs to forward to the _generate_examples() method of the builder.