mindspore.dataset.config.get_prefetch_size

mindspore.dataset.config.get_prefetch_size()

Get the prefetch size as for number of rows. If set_prefetch_size is never called before, the default value 16 will be returned.

Returns

int, total number of rows to be prefetched.

Examples

>>> # Get the global configuration of prefetch size.
>>> # If set_prefetch_size() is never called before, the default value(16) will be returned.
>>> import mindspore.dataset as ds
>>> prefetch_size = ds.config.get_prefetch_size()