neural_compressor.data.dataloaders.fetcher

Definitions of the methods to fetch data from an iterable-style or list-style dataset.

Module Contents

Classes

Fetcher

Base class for different fetchers.

IterableFetcher

Iterate to get next batch-size samples as a batch.

IndexFetcher

Take single index or a batch of indices to fetch samples as a batch.

class neural_compressor.data.dataloaders.fetcher.Fetcher(dataset, collate_fn, drop_last)

Bases: object

Base class for different fetchers.

class neural_compressor.data.dataloaders.fetcher.IterableFetcher(dataset, collate_fn, drop_last, distributed)

Bases: Fetcher

Iterate to get next batch-size samples as a batch.

class neural_compressor.data.dataloaders.fetcher.IndexFetcher(dataset, collate_fn, drop_last, distributed)

Bases: Fetcher

Take single index or a batch of indices to fetch samples as a batch.