Skip to content

Commit c604f70

Browse files
authored
Merge pull request #515 from inexorabletash/wording-the-list
Wording change: Prefix literal lists with "the list"
2 parents 311f2ac + 7f0cd70 commit c604f70

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

index.bs

+18-18
Original file line numberDiff line numberDiff line change
@@ -1990,7 +1990,7 @@ Data truncation will occur when the values in the range exceed the range of the
19901990
1. Let |descriptor| be a new {{MLOperandDescriptor}}.
19911991
1. Set |descriptor|.{{MLOperandDescriptor/dataType}} to |type|.
19921992
1. Let |size| be *max(0, ceil((end - start)/step))*.
1993-
1. Set |descriptor|.{{MLOperandDescriptor/dimensions}} to « |size| ».
1993+
1. Set |descriptor|.{{MLOperandDescriptor/dimensions}} to the [=/list=] « |size| ».
19941994
1. If any of the following sub-steps fail, [=exception/throw=] an "{{OperationError}}" {{DOMException}}.
19951995
1. Let |operand| be the result of [=creating an MLOperand=] given [=this=], |start|, |end|, |step|, and |type|.
19961996
1. Make a request to the underlying platform to:
@@ -2138,12 +2138,12 @@ partial interface MLGraphBuilder {
21382138
1. If |inputSize| is not 4, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
21392139
1. If |filterSize| is not 4, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
21402140
1. If |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dataType}} is not the same as |filter|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dataType}}, then [=exception/throw=] a {{TypeError}}.
2141-
1. If |options|.{{MLConv2dOptions/padding}} does not [=map/exist=], set it to « 0, 0, 0, 0 ».
2141+
1. If |options|.{{MLConv2dOptions/padding}} does not [=map/exist=], set it to the [=/list=] « 0, 0, 0, 0 ».
21422142
1. Else if the [=list/size=] of |options|.{{MLConv2dOptions/padding}} is not 4, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
2143-
1. If |options|.{{MLConv2dOptions/strides}} does not [=map/exist=], set it to « 1, 1 ».
2143+
1. If |options|.{{MLConv2dOptions/strides}} does not [=map/exist=], set it to the [=/list=] « 1, 1 ».
21442144
1. Else if the [=list/size=] of |options|.{{MLConv2dOptions/strides}} is not 2, then [=exception/throw=] a {{TypeError}}.
21452145
1. If any element in |options|.{{MLConv2dOptions/strides}} is equal to 0, then [=exception/throw=] a {{TypeError}}.
2146-
1. If |options|.{{MLConv2dOptions/dilations}} does not [=map/exist=], set it to « 1, 1 ».
2146+
1. If |options|.{{MLConv2dOptions/dilations}} does not [=map/exist=], set it to the [=/list=] « 1, 1 ».
21472147
1. Else if the [=list/size=] of |options|.{{MLConv2dOptions/dilations}} is not 2, then [=exception/throw=] a {{TypeError}}.
21482148
1. If |options|.{{MLConv2dOptions/autoPad}} does not [=map/exist=], set it to {{MLAutoPad/"explicit"}}.
21492149
1. If |options|.{{MLConv2dOptions/groups}} is 0, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
@@ -2314,14 +2314,14 @@ partial interface MLGraphBuilder {
23142314
1. If |inputSize| is not 4, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
23152315
1. If |filterSize| is not 4, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
23162316
1. If |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dataType}} is not the same as {{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dataType}}, then [=exception/throw=] a {{TypeError}}.
2317-
1. If |options|.{{MLConvTranspose2dOptions/padding}} does not [=map/exist=], set it to « 0, 0, 0, 0 ».
2317+
1. If |options|.{{MLConvTranspose2dOptions/padding}} does not [=map/exist=], set it to the [=/list=] « 0, 0, 0, 0 ».
23182318
1. Else if the [=list/size=] of |options|.{{MLConvTranspose2dOptions/padding}} is not 4, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
2319-
1. If |options|.{{MLConvTranspose2dOptions/strides}} does not [=map/exist=], set it to « 1, 1 ».
2319+
1. If |options|.{{MLConvTranspose2dOptions/strides}} does not [=map/exist=], set it to the [=/list=] « 1, 1 ».
23202320
1. Else if the [=list/size=] of |options|.{{MLConvTranspose2dOptions/strides}} is not 2, then [=exception/throw=] a {{TypeError}}.
23212321
1. If any element in |options|.{{MLConv2dOptions/strides}} is equal to 0, then [=exception/throw=] a {{TypeError}}.
2322-
1. If |options|.{{MLConvTranspose2dOptions/dilations}} does not [=map/exist=], set it to « 1, 1 ».
2322+
1. If |options|.{{MLConvTranspose2dOptions/dilations}} does not [=map/exist=], set it to the [=/list=] « 1, 1 ».
23232323
1. Else if the [=list/size=] of |options|.{{MLConvTranspose2dOptions/dilations}} is not 2, then [=exception/throw=] a {{TypeError}}.
2324-
1. If |options|.{{MLConvTranspose2dOptions/outputPadding}} does not [=map/exist=], set it to « 0, 0 ».
2324+
1. If |options|.{{MLConvTranspose2dOptions/outputPadding}} does not [=map/exist=], set it to the [=/list=] « 0, 0 ».
23252325
1. Else if the [=list/size=] of |options|.{{MLConvTranspose2dOptions/outputPadding}} is not 2, then [=exception/throw=] a {{TypeError}}.
23262326
1. If |options|.{{MLConvTranspose2dOptions/outputSizes}} [=map/exists=]:
23272327
1. If the [=list/size=] of |options|.{{MLConvTranspose2dOptions/outputSizes}} is not 2, then [=exception/throw=] a {{TypeError}}.
@@ -3095,7 +3095,7 @@ partial interface MLGraphBuilder {
30953095
Type compatibility between |a|, |b| and |options|.{{MLGemmOptions/c}} can be also checked.
30963096
</div>
30973097
1. Let |desc| be a new {{MLOperandDescriptor}}.
3098-
1. Set |desc|.{{MLOperandDescriptor/dimensions}} to « |shapeA|[0], |shapeB|[1] ».
3098+
1. Set |desc|.{{MLOperandDescriptor/dimensions}} to the [=/list=] « |shapeA|[0], |shapeB|[1] ».
30993099
1. Set |desc|.{{MLOperandDescriptor/dataType}} to |a|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dataType}}.
31003100
1. If any of the following sub-steps fail, [=exception/throw=] an "{{OperationError}}" {{DOMException}}.
31013101
1. Let |output| be the result of [=creating an MLOperand=] given [=this=] and |desc|.
@@ -4573,7 +4573,7 @@ partial interface MLGraphBuilder {
45734573
<div class=algorithm-steps>
45744574
1. Let |shapeA| be |a|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}} and |sizeA| the [=list/size=] of |shapeA|.
45754575
1. Let |shapeB| be |b|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}} and |sizeB| the [=list/size=] of |shapeB|.
4576-
1. If |sizeA| and |sizeB| is 1, return « 1 ».
4576+
1. If |sizeA| and |sizeB| is 1, return the [=/list=] « 1 ».
45774577
1. If |sizeA| is 1 and |sizeB| is not, then insert 1 in the front of |shapeA| to become [ 1 | |shapeA| ] and let |sizeA| be 2.
45784578
1. If |shapeA|[0] is not equal to |shapeB|[|sizeB| - 2], then [=exception/throw=] an "{{OperationError}}" {{DOMException}}.
45794579
1. If |sizeB| is 1 and |sizeA| is not, then append 1 to |shapeB| to become [ |shapeB| | 1 ] and let |sizeB| be 2.
@@ -4861,18 +4861,18 @@ partial interface MLGraphBuilder {
48614861
1. If the [=list/size=] of |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}} is not 4, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
48624862
1. If |options|.{{MLPool2dOptions/windowDimensions}} [=map/exists=] and its [=list/size=] is not 2, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
48634863
1. Otherwise, set |options|.{{MLPool2dOptions/windowDimensions}} to the height and width dimensions of the shape of |input|.
4864-
1. If |options|.{{MLPool2dOptions/outputSizes}} [=map/exists=], or if |options|.{{MLPool2dOptions/padding}} does not [=map/exist=], set |options|.{{MLPool2dOptions/padding}} to « 0, 0, 0, 0 ».
4864+
1. If |options|.{{MLPool2dOptions/outputSizes}} [=map/exists=], or if |options|.{{MLPool2dOptions/padding}} does not [=map/exist=], set |options|.{{MLPool2dOptions/padding}} to the [=/list=] « 0, 0, 0, 0 ».
48654865
1. If the [=list/size=] of |options|.{{MLPool2dOptions/padding}} is not 4, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
4866-
1. If |options|.{{MLPool2dOptions/strides}} does not [=map/exist=], set |options|.{{MLPool2dOptions/strides}} to « 1, 1 ».
4866+
1. If |options|.{{MLPool2dOptions/strides}} does not [=map/exist=], set |options|.{{MLPool2dOptions/strides}} to the [=/list=] « 1, 1 ».
48674867
1. If the [=list/size=] of |options|.{{MLPool2dOptions/strides}} is not 2, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
48684868
1. If any value in |options|.{{MLPool2dOptions/strides}} is not greater than 0, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
48694869
1. If |options|.{{MLPool2dOptions/outputSizes}} [=map/exists=]:
48704870
1. If the [=list/size=] of |options|.{{MLPool2dOptions/outputSizes}} is not 2, then [=exception/throw=] a {{TypeError}}.
48714871
1. If the elements of |options|.{{MLPool2dOptions/outputSizes}} are not smaller than the elements at the same dimension (index) for |options|.{{MLPool2dOptions/strides}}, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
4872-
1. If |options|.{{MLPool2dOptions/dilations}} does not [=map/exist=], set |options|.{{MLPool2dOptions/dilations}} to « 1, 1 ».
4872+
1. If |options|.{{MLPool2dOptions/dilations}} does not [=map/exist=], set |options|.{{MLPool2dOptions/dilations}} to the [=/list=] « 1, 1 ».
48734873
1. If the [=list/size=] of |options|.{{MLPool2dOptions/dilations}} is not 2, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
48744874
1. If any value in |options|.{{MLPool2dOptions/dilations}} is not greater than 0, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
4875-
1. If |options|.{{MLPool2dOptions/autoPad}} is not {{MLAutoPad/"explicit"}}, set |options|.{{MLPool2dOptions/padding}} to « 0, 0, 0, 0 ».
4875+
1. If |options|.{{MLPool2dOptions/autoPad}} is not {{MLAutoPad/"explicit"}}, set |options|.{{MLPool2dOptions/padding}} to the [=/list=] « 0, 0, 0, 0 ».
48764876
1. Let |desc| be a copy of |input|.{{MLOperand/[[descriptor]]}}.
48774877
1. If any of the following sub-steps fail, [=exception/throw=] an "{{OperationError}}" {{DOMException}}.
48784878
1. Make a request to the underlying platform to:
@@ -5266,10 +5266,10 @@ partial interface MLGraphBuilder {
52665266
To <dfn for="MLGraphBuilder">check resample options</dfn> given |options|, run the following steps:
52675267
</summary>
52685268
<div class=algorithm-steps>
5269-
1. If |options|.{{MLResample2dOptions/scales}} does not [=map/exist=], set it to to « 1.0, 1.0 ».
5269+
1. If |options|.{{MLResample2dOptions/scales}} does not [=map/exist=], set it to to the [=/list=] « 1.0, 1.0 ».
52705270
1. Otherwise, if any of its values is not greater than 0, or if its [=list/size=] is not 2, return false.
52715271
1. If |options|.{{MLResample2dOptions/sizes}} [=map/exists=], and if its size is not 2, or if any of its values is not greater than 0, return false.
5272-
1. If |options|.{{MLResample2dOptions/axes}} does not [=map/exists=], set it to « 2, 3 ».
5272+
1. If |options|.{{MLResample2dOptions/axes}} does not [=map/exists=], set it to the [=/list=] « 2, 3 ».
52735273
1. Otherwise, if its value is not one of « 0, 1», « 1, 2», « 2, 3 », return false.
52745274
1. Return true.
52755275
</div>
@@ -5338,9 +5338,9 @@ partial interface MLGraphBuilder {
53385338
<div class=algorithm-steps>
53395339
1. [=Assert=]: the type of |input| is {{MLOperand}}.
53405340
1. Let |outputShape| be an empty array of {{unsigned long}}.
5341-
1. If |newShape| is a scalar [=number=], set |outputShape| to « 1 ».
5341+
1. If |newShape| is a scalar [=number=], set |outputShape| to the [=/list=] « 1 ».
53425342
1. Otherwise, if |newShape| is an array of {{unsigned long}}:
5343-
1. If the [=list/size=] of |newShape| is 0, set |outputShape| to « 1 » (reshaping to scalar).
5343+
1. If the [=list/size=] of |newShape| is 0, set |outputShape| to the [=/list=] « 1 » (reshaping to scalar).
53445344
1. If any value in |newShape| is 0, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
53455345
1. Let |inputElementCount| be the product of all elements in |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}.
53465346
1. If product of all values in |newShape| is not equal to |inputElementCount|, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.

0 commit comments

Comments
 (0)