This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page. class


Add parallelization support to datastore


PartitionableByIndex is an abstract mixin class that adds parallelization support to your custom datastore for use with Deep Learning Toolbox™. This class requires Parallel Computing Toolbox™.

To use this mixin class, you must inherit from the PartitionableByIndex class in addition to inheriting from the Datastore base class. Type the following syntax as the first line of your class definition file:

classdef MyDatastore < & ...

To add support for parallel processing to your custom datastore, you must:

  • Inherit from an additional class PartitionableByIndex

  • Define the additional method: partitionByIndex

For more details and steps to create your custom datastore with parallel processing support, see Develop Custom Mini-Batch Datastore.


partitionByIndexPartition a datastore according to indices



For information on class attributes, see Class Attributes (MATLAB).

Copy Semantics

Handle. To learn how handle classes affect copy operations, see Copying Objects (MATLAB).

Introduced in R2018a