modelzoo.transformers.pytorch.input_utils.SubsetSequentialSampler#

class modelzoo.transformers.pytorch.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

__call__(*args: Any, **kwargs: Any) Any#

Call self as a function.

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