To define a dlarray, you need to specify the data type, shape, and underlying data storage. Here's an example of how to create a dlarray with a 2x3x4x5 shape:
main.m232 chars8 lines
In this example, we're using single precision (dataType = 'single') and storing the data on the CPU (storageType = 'cpu'). We're also specifying that the data is in "SSCB" order (samples, spatial dimensions, channels, batches) using the 'SSCB' option.
You can also create dlarrays with different storage formats, such as on a GPU ('gpu') or as a sparse array ('csparse'). The available options depend on your hardware and MATLAB installation.
For more information on creating and manipulating dlarrays, see the MATLAB documentation.
gistlibby LogSnag