modelzoo.common.pytorch.utils.SampleGenerator#

class modelzoo.common.pytorch.utils.SampleGenerator[source]#

Bases: object

Iterator which returns multiple samples of a given input data.

Can be used in place of a PyTorch DataLoader to generate synthetic data.

Parameters
  • data – The data which should be returned at each iterator step.

  • sample_count – The maximum number of data samples to be returned.

Methods

next

Generate next data sample

__init__(data, sample_count)[source]#
next()[source]#

Generate next data sample