You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. If |variance|'s [=MLOperand/rank=] is not 1, then [=exception/throw=] a {{TypeError}}.
1559
1559
1. If |variance|'s [=MLOperand/shape=][0] is not equal to |input|'s [=MLOperand/shape=][|options|.{{MLBatchNormalizationOptions/axis}}], then [=exception/throw=] a {{TypeError}}.
1560
1560
1. If |options|.{{MLBatchNormalizationOptions/scale}}[=map/exists=]:
1561
-
1. If its [=list/size=] is not 1, then [=exception/throw=] a {{TypeError}}.
1561
+
1. If its [=MLOperand/rank=] is not 1, then [=exception/throw=] a {{TypeError}}.
1562
1562
1. If |options|.{{MLBatchNormalizationOptions/scale}}'s [=MLOperand/shape=][0] is not equal to |input|'s [=MLOperand/shape=][|options|.{{MLBatchNormalizationOptions/axis}}], then [=exception/throw=] a {{TypeError}}.
1563
1563
1. If |options|.{{MLBatchNormalizationOptions/bias}}[=map/exists=]:
1564
-
1. If its [=list/size=] is not 1, then [=exception/throw=] a {{TypeError}}.
1564
+
1. If its [=MLOperand/rank=] is not 1, then [=exception/throw=] a {{TypeError}}.
1565
1565
1. If |options|.{{MLBatchNormalizationOptions/bias}}'s [=MLOperand/shape=][0] is not equal to |input|'s [=MLOperand/shape=][|options|.{{MLBatchNormalizationOptions/axis}}], then [=exception/throw=] a {{TypeError}}.
1566
1566
1. *Make graph connections:*
1567
1567
1. Let |operator| be an [=operator=] for the batchNormalization operation, given |input|, |mean|, |variance| and |options|.
The <dfn method for=MLGraphBuilder>slice(|input|, |starts|, |sizes|)</dfn> method steps are:
5180
5180
</summary>
5181
5181
1. If [=MLGraphBuilder/validating operand=] with [=this=] and |input| returns false, then [=exception/throw=] a {{TypeError}}.
5182
-
1. If |sizes|'s [=list/size=]is 0, then [=exception/throw=] a {{TypeError}}.
5182
+
1. If any of |sizes|'s [=list/items=]are 0, then [=exception/throw=] a {{TypeError}}.
5183
5183
1. If |starts|'s [=list/size=] and |sizes|'s [=list/size=] are not both equal to |input|'s [=MLOperand/rank=], then [=exception/throw=] a {{TypeError}}.
5184
5184
1. *Make graph connections:*
5185
5185
1. Let |output| be the result of [=copying an MLOperand=] given |input|.
@@ -5777,17 +5777,17 @@ Broadcasting refers to how operations treat tensors with different shapes, and f
5777
5777
5778
5778
<details open algorithm>
5779
5779
<summary>
5780
-
To <dfn data-lt="unidirectionally broadcasting the shapes">unidirectionally broadcast the shapes</dfn> |A| and |B|, perform the following steps. |A| and |B| are [=/lists=] of positive integers, representing the dimensions of tensors, and the steps return a new [=/list=] of positive integers, or failure.
5780
+
To <dfn data-lt="unidirectionally broadcasting the shapes">unidirectionally broadcast the shapes</dfn> |shapeA| and |shapeB|, perform the following steps. |shapeA| and |shapeB| are [=/lists=] of positive integers, representing the dimensions of tensors, and the steps return a new [=/list=] of positive integers, or failure.
5781
5781
</summary>
5782
5782
5783
-
1. Let |sizeA| be |A|'s [=list/size=].
5784
-
1. Let |sizeB| be |B|'s [=list/size=].
5783
+
1. Let |sizeA| be |shapeA|'s [=list/size=].
5784
+
1. Let |sizeB| be |shapeB|'s [=list/size=].
5785
5785
1. If |sizeB| > |sizeA|, then return failure.
5786
-
1. Let |paddedB| be a [=list/clone=] of |B|.
5786
+
1. Let |paddedB| be a [=list/clone=] of |shapeB|.
5787
5787
1. While |paddedB|'s [=list/size=] is less than |sizeA|, [=list/prepend=] 1 to |paddedB|.
5788
5788
1. Let |outputShape| be a new [=/list=].
5789
5789
1. [=list/For each=] |index| in [=the range=] 0 to |sizeA|, exclusive:
5790
-
1. Let |dimA| be |A|[|index|].
5790
+
1. Let |dimA| be |shapeA|[|index|].
5791
5791
1. Let |dimB| be |paddedB|[|index|].
5792
5792
1. If |dimA| is not equal to |dimB| and |dimA| is not equal to 1, then return failure.
5793
5793
1. [=list/Append=] |dimA| to |outputShape|.
@@ -5796,20 +5796,20 @@ To <dfn data-lt="unidirectionally broadcasting the shapes">unidirectionally broa
5796
5796
</details>
5797
5797
5798
5798
<p algorithm>
5799
-
|A| is <dfn>unidirectionally broadcastable</dfn> to |B| if [=unidirectionally broadcasting the shapes=] |A| and |B| does not result in failure.
5799
+
|shapeA| is <dfn>unidirectionally broadcastable</dfn> to |shapeB| if [=unidirectionally broadcasting the shapes=] |shapeA| and |shapeB| does not result in failure.
5800
5800
</p>
5801
5801
5802
5802
<details open algorithm>
5803
5803
<summary>
5804
-
To <dfn data-lt="bidirectionally broadcasting the shapes">bidirectionally broadcast the shapes</dfn> |A| and |B|, perform the following steps. |A| and |B| are [=/lists=] of positive integers, representing the dimensions of tensors, and the steps return a new [=/list=] of positive integers, or failure.
5804
+
To <dfn data-lt="bidirectionally broadcasting the shapes">bidirectionally broadcast the shapes</dfn> |shapeA| and |shapeB|, perform the following steps. |shapeA| and |shapeB| are [=/lists=] of positive integers, representing the dimensions of tensors, and the steps return a new [=/list=] of positive integers, or failure.
5805
5805
</summary>
5806
5806
5807
-
1. Let |sizeA| be |A|'s [=list/size=].
5808
-
1. Let |sizeB| be |B|'s [=list/size=].
5807
+
1. Let |sizeA| be |shapeA|'s [=list/size=].
5808
+
1. Let |sizeB| be |shapeB|'s [=list/size=].
5809
5809
1. Let |outputSize| be the maximum of |sizeA| and |sizeB|.
5810
-
1. Let |paddedA| be a [=list/clone=] of |A|.
5810
+
1. Let |paddedA| be a [=list/clone=] of |shapeA|.
5811
5811
1. While |paddedA|'s [=list/size=] is less than |outputSize|, [=list/prepend=] 1 to |paddedA|.
5812
-
1. Let |paddedB| be a [=list/clone=] of |B|.
5812
+
1. Let |paddedB| be a [=list/clone=] of |shapeB|.
5813
5813
1. While |paddedB|'s [=list/size=] is less than |outputSize|, [=list/prepend=] 1 to |paddedB|.
5814
5814
1. Let |outputShape| be a new [=/list=].
5815
5815
1. [=list/For each=] |index| in [=the range=] 0 to |outputSize|, exclusive:
@@ -5822,7 +5822,7 @@ To <dfn data-lt="bidirectionally broadcasting the shapes">bidirectionally broadc
5822
5822
</details>
5823
5823
5824
5824
<p algorithm>
5825
-
|A| is <dfn>bidirectionally broadcastable</dfn> to |B| if [=bidirectionally broadcasting the shapes=] |A| and |B| does not result in failure.
5825
+
|shapeA| is <dfn>bidirectionally broadcastable</dfn> to |shapeB| if [=bidirectionally broadcasting the shapes=] |shapeA| and |shapeB| does not result in failure.
0 commit comments