InstanceNormalization#

InstanceNormalization - 6#

Version

This version of the operator has been available since version 6.

Summary

Carries out instance normalization as described in the paper https://arxiv.org/abs/1607.08022.

y = scale * (x - mean) / sqrt(variance + epsilon) + B, where mean and variance are computed per instance per channel.

Attributes

  • epsilon: The epsilon value to use to avoid division by zero. Default value is 9.999999747378752e-06.

Inputs

  • input (heterogeneous) - T: Input data tensor from the previous operator; dimensions for image case are (N x C x H x W), where N is the batch size, C is the number of channels, and H and W are the height and the width of the data. For non image case, the dimensions are in the form of (N x C x D1 x D2 … Dn), where N is the batch size.

  • scale (heterogeneous) - T: The input 1-dimensional scale tensor of size C.

  • B (heterogeneous) - T: The input 1-dimensional bias tensor of size C.

Outputs

  • output (heterogeneous) - T: The output tensor of the same shape as input.

Type Constraints

  • T in ( tensor(double), tensor(float), tensor(float16) ): Constrain input and output types to float tensors.

Examples

Differences

00Carries out instance normalization as described in the paperCarries out instance normalization as described in the paper
11https://arxiv.org/abs/1607.08022.https://arxiv.org/abs/1607.08022.
22
33y = scale * (x - mean) / sqrt(variance + epsilon) + B,y = scale * (x - mean) / sqrt(variance + epsilon) + B,
44where mean and variance are computed per instance per channel.where mean and variance are computed per instance per channel.
55
66**Attributes****Attributes**
77
8* **consumed_inputs**:
9 legacy optimization attribute.
108* **epsilon**:* **epsilon**:
119 The epsilon value to use to avoid division by zero, default is The epsilon value to use to avoid division by zero. Default value is 9.999999747378752e-06.
12 1e-5f. Default value is 9.999999747378752e-06.
1310
1411**Inputs****Inputs**
1512
1613* **input** (heterogeneous) - **T**:* **input** (heterogeneous) - **T**:
17 The input 4-dimensional tensor of shape NCHW.
14 Input data tensor from the previous operator; dimensions for image
15 case are (N x C x H x W), where N is the batch size, C is the number
16 of channels, and H and W are the height and the width of the data.
17 For non image case, the dimensions are in the form of (N x C x D1 x
18 D2 ... Dn), where N is the batch size.
1819* **scale** (heterogeneous) - **T**:* **scale** (heterogeneous) - **T**:
1920 The input 1-dimensional scale tensor of size C. The input 1-dimensional scale tensor of size C.
2021* **B** (heterogeneous) - **T**:* **B** (heterogeneous) - **T**:
2122 The input 1-dimensional bias tensor of size C. The input 1-dimensional bias tensor of size C.
2223
2324**Outputs****Outputs**
2425
2526* **output** (heterogeneous) - **T**:* **output** (heterogeneous) - **T**:
2627 The output 4-dimensional tensor of the same shape as input. The output tensor of the same shape as input.
2728
2829**Type Constraints****Type Constraints**
2930
3031* **T** in (* **T** in (
3132 tensor(double), tensor(double),
3233 tensor(float), tensor(float),
3334 tensor(float16) tensor(float16)
3435 ): ):
3536 Constrain input and output types to float tensors. Constrain input and output types to float tensors.

InstanceNormalization - 1#

Version

This version of the operator has been available since version 1.

Summary

Carries out instance normalization as described in the paper https://arxiv.org/abs/1607.08022.

y = scale * (x - mean) / sqrt(variance + epsilon) + B, where mean and variance are computed per instance per channel.

Attributes

  • consumed_inputs: legacy optimization attribute.

  • epsilon: The epsilon value to use to avoid division by zero, default is 1e-5f. Default value is 9.999999747378752e-06.

Inputs

  • input (heterogeneous) - T: The input 4-dimensional tensor of shape NCHW.

  • scale (heterogeneous) - T: The input 1-dimensional scale tensor of size C.

  • B (heterogeneous) - T: The input 1-dimensional bias tensor of size C.

Outputs

  • output (heterogeneous) - T: The output 4-dimensional tensor of the same shape as input.

Type Constraints

  • T in ( tensor(double), tensor(float), tensor(float16) ): Constrain input and output types to float tensors.