cerebras.modelzoo.data.common.input_utils.SubsetSequentialSampler#

class cerebras.modelzoo.data.common.input_utils.SubsetSequentialSampler[source]#

Bases: torch.utils.data.Sampler.

Samples elements sequentially, starting from given start_index,

always in the same order.

Parameters
  • data_source (Dataset) – dataset to sample from

  • start_index (int) – index where sampling starts from

Methods

Attributes

data_source

start_index

__init__(data_source: Sized, start_index: int) None[source]#
__call__(*args: Any, **kwargs: Any) Any#

Call self as a function.

static __new__(cls, *args: Any, **kwargs: Any) Any#