Class DataLoader.Builder

java.lang.Object
ai.beestream.jitnn.data.DataLoader.Builder
Enclosing class:
DataLoader

public static final class DataLoader.Builder extends Object
Options of a DataLoader: shuffling, worker threads, prefetching.
  • Method Details

    • shuffle

      public DataLoader.Builder shuffle(long seed)
      Reshuffles every epoch, from seed and the epoch number.
    • dropLast

      public DataLoader.Builder dropLast(boolean on)
      Leaves out the last batch when it is short.
    • transform

      Applied to every sample as its batch is assembled (augmentation, normalisation).
    • workers

      public DataLoader.Builder workers(int n)
      Threads assembling batches ahead (0: on the caller's thread, when asked for).
    • prefetch

      public DataLoader.Builder prefetch(int batches)
      Batches assembled ahead of the one being used, with workers (default 2).
    • build

      public DataLoader build()
      The loader with these options.