DataLoader<T> constructor

DataLoader<T>(
  1. Dataset<T> dataset, {
  2. int batchSize = 1,
  3. bool shuffle = false,
  4. bool dropLast = false,
  5. int? seed,
})

Implementation

DataLoader(
  this.dataset, {
  this.batchSize = 1,
  this.shuffle = false,
  this.dropLast = false,
  int? seed,
}) : _rng = math.Random(seed ?? 0) {
  if (batchSize < 1) {
    throw ArgumentError('batchSize must be >= 1, got $batchSize');
  }
}