# instancenorm

## Syntax

## Description

The instance normalization operation normalizes the input data
across each channel for each observation independently. To improve the convergence of training
the convolutional neural network and reduce the sensitivity to network hyperparameters, use
instance normalization between convolution and nonlinear operations such as `relu`

.

After normalization, the operation shifts the input by a learnable offset *β* and scales it by a learnable scale factor *γ*.

The `instancenorm`

function applies the layer normalization 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 instance normalization within a `layerGraph`

object
or `Layer`

array, use
`instanceNormalizationLayer`

.

applies the instance normalization operation to the input data `Y`

= instancenorm(`X`

,`offset`

,`scaleFactor`

)`X`

and
transforms using the specified offset and scale factor.

The function normalizes over grouped subsets of the `'S'`

(spatial),
`'T'`

(time), and `'U'`

(unspecified) dimensions of
`X`

for each observation in the `'C'`

(channel) and
`'B'`

(batch) dimensions, independently.

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

option.

applies the instance normalization operation to the unformatted `Y`

= instancenorm(`X`

,`offset`

,`scaleFactor`

,'DataFormat',FMT)`dlarray`

object `X`

with format specified by `FMT`

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

is an unformatted
`dlarray`

object with dimensions in the same order as
`X`

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

specifies data
for 2-D image input with format `'SSCB'`

(spatial, spatial, channel,
batch).

specifies options using one or more name-value pair arguments in addition to the input
arguments in previous syntaxes. For example, `Y`

= instancenorm(___`Name,Value`

)`'Epsilon',3e-5`

sets the
variance offset to `3e-5`

.

## Examples

## Input Arguments

## Output Arguments

## Algorithms

## Extended Capabilities

## Version History

**Introduced in R2021a**