Most layers in a layer array or layer graph pass data to subsequent layers as formatted
dlarray objects.
The format of a dlarray object is a string of characters in which each
character describes the corresponding dimension of the data. The format consists of one or
more of these characters:
"S" — Spatial
"C" — Channel
"B" — Batch
"T" — Time
"U" — Unspecified
For example, you can describe 2-D image data that is represented as a 4-D array, where the
first two dimensions correspond to the spatial dimensions of the images, the third
dimension corresponds to the channels of the images, and the fourth dimension
corresponds to the batch dimension, as having the format "SSCB"
(spatial, spatial, channel, batch).
You can interact with these dlarray objects in automatic differentiation
workflows, such as those for:
This table shows the supported input formats of Crop2DLayer objects and the
corresponding output format. If the software passes the output of the layer to a custom
layer that does not inherit from the nnet.layer.Formattable class, or to
a FunctionLayer object with the Formattable property set
to 0 (false), then the layer receives an unformatted
dlarray object with dimensions ordered according to the formats in this
table. The formats listed here are only a subset of the formats that the layer supports. The
layer might support additional formats, such as formats with additional
"S" (spatial) or "U" (unspecified)
dimensions.
| Input Format | Output Format |
|---|
"SSCB" (spatial, spatial, channel,
batch)
| "SSCB" (spatial, spatial, channel,
batch)
|
"SSC" (spatial, spatial,
channel)
| "SSC" (spatial, spatial,
channel)
|
In dlnetwork objects, Crop2DLayer objects also
support these input and output format combinations.
| Input Format | Output Format |
|---|
"SSCBT" (spatial, spatial, channel,
batch, time)
| "SSCBT" (spatial, spatial, channel,
batch, time)
|
"SSCT" (spatial, spatial, channel,
time)
| "SSCT" (spatial, spatial, channel,
time)
|