Interface Sampler

  • All Known Implementing Classes:
    BatchSampler

    public interface Sampler
    An interface for sampling data items from a RandomAccessDataset.

    A Sampler implementation returns an iterator of batches for the RandomAccessDataset. Instead of returning the actual items, it returns the item indices. Different samplers can have different ways of sampling such as sampling with or without replacement.

    Many of the samplers may also make use of Sampler.SubSamplers which sample not in batches but in individual data item indices.

    • Method Detail

      • getBatchSize

        int getBatchSize()
        Returns the batch size of the Sampler.
        Returns:
        the batch size of the Sampler, -1 if batch size is not fixed