matlab.io.datastore.BackgroundDispatchable class

Package: matlab.io.datastore

(Not recommended) Add prefetch reading support to datastore

matlab.io.datastore.BackgroundDispatchable is not recommended. For more information, see Compatibility Considerations.

Description

matlab.io.datastore.BackgroundDispatchable is an abstract mixin class that adds support for prefetch reading to your custom datastore for use with Deep Learning Toolbox™.

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

classdef MyDatastore < matlab.io.Datastore & ...
                       matlab.io.datastore.BackgroundDispatchable
    ...
end

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

  • Inherit from an additional class matlab.io.datastore.BackgroundDispatchable

  • Define the additional method: readByIndex

For more details and steps to create your custom datastore to optimize performance during training, prediction, and classification, see Develop Custom Mini-Batch Datastore.

Properties

expand all

Dispatch observations in the background during training, prediction, or classification, specified as true or false. To use background dispatching, you must have Parallel Computing Toolbox™.

Attributes:

Publictrue

Methods

readByIndex(Not recommended) Return observations from a datastore specified by index

Attributes

Abstracttrue
Sealedfalse

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

Copy Semantics

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

Compatibility Considerations

expand all

Not recommended starting in R2019a

Introduced in R2018a