BatchUp¶
BatchUp is a lightweight Python library for extracting mini-batches of data for the purpose of training neural networks.
A quick example:
from batchup import data_source
# Construct an array data source
ds = data_source.ArrayDataSource([train_X, train_y])
# Iterate over samples, drawing batches of 64 elements in
# random order
for (batch_X, batch_y) in ds.batch_iterator(batch_size=64,
shuffle=True):
# Processes batches here...
User Guide¶
- Installation
- Basic batch iteration from arrays
- Data augmentation on-the-fly
- Loading images from disk on-the-fly: data from array-like objects
- Parallel processing for faster batching
- Iterating over data sets of different sizes (e.g. for semi-supervised learning)
- Sample weighting to alter likelihood of samples