Main Content

Deep learning convolution

The convolution operation applies sliding filters to the input
data. Use the `dlconv`

function for deep learning convolution, grouped
convolution, and channel-wise separable convolution.

The `dlconv`

function applies the deep learning convolution operation
to `dlarray`

data.
Using `dlarray`

objects makes working with high
dimensional data easier by allowing you to label the dimensions. For example, you can label
which dimensions correspond to spatial, time, channel, and batch dimensions using the
`'S'`

, `'T'`

, `'C'`

, and
`'B'`

labels, respectively. For unspecified and other dimensions, use the
`'U'`

label. For `dlarray`

object functions that operate
over particular dimensions, you can specify the dimension labels by formatting the
`dlarray`

object directly, or by using the `'DataFormat'`

option.

**Note**

To apply convolution within a `layerGraph`

object
or `Layer`

array, use
one of the following layers:

applies the deep learning convolution operation to the formatted `dlY`

= dlconv(`dlX`

,`weights`

,`bias`

)`dlarray`

object `dlX`

. The function uses sliding convolutional filters defined by
`weights`

and adds the constant `bias`

. The output
`dlY`

is a formatted `dlarray`

object with the same
format as `dlX`

.

The function, by default, convolves over up to three dimensions
of `dlX`

labeled `'S'`

(spatial). To convolve over
dimensions labeled `'T'`

(time), specify `weights`

with a
`'T'`

dimension using a formatted `dlarray`

object or by
using the `'WeightsFormat'`

option.

For unformatted input data, use the `'DataFormat'`

option.

applies the deep learning convolution operation to the unformatted `dlY`

= dlconv(`dlX`

,`weights`

,`bias`

,'DataFormat',FMT)`dlarray`

object `dlX`

with format specified by `FMT`

using any of
the previous syntaxes. The output `dlY`

is an unformatted
`dlarray`

object with dimensions in the same order as
`dlX`

. For example, `'DataFormat','SSCB'`

specifies
data for 2-D convolution with format `'SSCB'`

(spatial, spatial, channel,
batch).

specifies options using one or more name-value pair arguments using any of the previous
syntaxes. For example, `dlY`

= dlconv(___,`Name,Value`

)`'WeightsFormat','TCU'`

specifies weights for 1-D
convolution with format `'TCU'`

(time, channel, unspecified).

`batchnorm`

| `dlarray`

| `dlfeval`

| `dlgradient`

| `fullyconnect`

| `maxpool`

| `relu`