InstanceNormalization#
InstanceNormalization - 6#
Version
domain: main
since_version: 6
function: False
support_level: SupportType.COMMON
shape inference: True
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
0 | 0 | Carries out instance normalization as described in the paper | Carries out instance normalization as described in the paper |
1 | 1 | https://arxiv.org/abs/1607.08022. | https://arxiv.org/abs/1607.08022. |
2 | 2 |
|
|
3 | 3 | y = scale * (x - mean) / sqrt(variance + epsilon) + B, | y = scale * (x - mean) / sqrt(variance + epsilon) + B, |
4 | 4 | where mean and variance are computed per instance per channel. | where mean and variance are computed per instance per channel. |
5 | 5 |
|
|
6 | 6 | **Attributes** | **Attributes** |
7 | 7 |
|
|
8 | * **consumed_inputs**: | ||
9 | legacy optimization attribute. | ||
10 | 8 | * **epsilon**: | * **epsilon**: |
11 | 9 | The epsilon value to use to avoid division by zero, default is |
|
12 | 1e-5f. Default value is 9.999999747378752e-06. | ||
13 | 10 |
|
|
14 | 11 | **Inputs** | **Inputs** |
15 | 12 |
|
|
16 | 13 | * **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. | ||
18 | 19 | * **scale** (heterogeneous) - **T**: | * **scale** (heterogeneous) - **T**: |
19 | 20 | The input 1-dimensional scale tensor of size C. | The input 1-dimensional scale tensor of size C. |
20 | 21 | * **B** (heterogeneous) - **T**: | * **B** (heterogeneous) - **T**: |
21 | 22 | The input 1-dimensional bias tensor of size C. | The input 1-dimensional bias tensor of size C. |
22 | 23 |
|
|
23 | 24 | **Outputs** | **Outputs** |
24 | 25 |
|
|
25 | 26 | * **output** (heterogeneous) - **T**: | * **output** (heterogeneous) - **T**: |
26 | 27 | The output 4-dimensional tensor of the same shape as input. |
|
27 | 28 |
|
|
28 | 29 | **Type Constraints** | **Type Constraints** |
29 | 30 |
|
|
30 | 31 | * **T** in ( | * **T** in ( |
31 | 32 | tensor(double), | tensor(double), |
32 | 33 | tensor(float), | tensor(float), |
33 | 34 | tensor(float16) | tensor(float16) |
34 | 35 | ): | ): |
35 | 36 | Constrain input and output types to float tensors. | Constrain input and output types to float tensors. |
InstanceNormalization - 1#
Version
domain: main
since_version: 1
function: False
support_level: SupportType.COMMON
shape inference: False
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.