matlab.io.datastore.MiniBatchable.read - (Not recommended) Read data from custom mini-batch datastore - MATLAB (original) (raw)

Before R2018a, to perform custom image preprocessing for training deep learning networks, you had to specify a custom read function using thereadFcn property of imageDatastore. However, reading files using a custom read function was slow becauseimageDatastore did not prefetch files.

In R2018a, four classes includingmatlab.io.datastore.MiniBatchable were introduced as a solution to perform custom image preprocessing with support for prefetching, shuffling, and parallel training. Implementing a custom mini-batch datastore usingmatlab.io.datastore.MiniBatchable has several challenges and limitations.

Starting in R2019a, built-in datastores natively support prefetch, shuffling, and parallel training when reading batches of data. The transform function is the preferred way to perform custom data preprocessing, or transformations. The combine function is the preferred way to concatenate read data from multiple datastores, including transformed datastores. Concatenated data can serve as the network inputs and expected responses for training deep learning networks. The transform and combine functions have several advantages over matlab.io.datastore.MiniBatchable.

There are no plans to remove the read method ofmatlab.io.datastore.MiniBatchable at this time.