Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
values ("byte", "float", or "int") correspond to the data type.
If dtypes are provided, then they are verified against the
inferred type for compatibility purposes. If None (default),
then all features contained in the file are extracted.
Returns:
--------
it: iterator
A repeating iterator that generates batches of data.
"""
loaders = [functools.partial(tfrecord_loader, data_path=data_pattern.format(split),
index_path=index_pattern.format(split) \
if index_pattern is not None else None,
description=description)
for split in splits.keys()]
return iterator_utils.sample_iterators(loaders, list(splits.values()))