DataLoader(x, y, batch_size=32, shuffle=True, drop_last=False)
Iterate over (x, y) in mini-batches, optionally shuffling each epoch.
Source code in minitorch/data.py
| def __init__(self, x, y, batch_size=32, shuffle=True, drop_last=False):
self.x = x
self.y = y
self.batch_size = batch_size
self.shuffle = shuffle
self.drop_last = drop_last
self.n = x.shape[0]
|