Skip to content

Commit 120e697

Browse files
authored
Merge pull request #517 from inexorabletash/wording-infra-let-set
Wording change: Use Infra's "Set ... to ..." pattern for properties
2 parents c604f70 + c0c6507 commit 120e697

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

index.bs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1865,7 +1865,7 @@ partial interface MLGraphBuilder {
18651865
1. If any of the following steps fail, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
18661866
1. Let |desc| be |inputs|[0].{{MLOperand/[[descriptor]]}}.
18671867
1. If |axis| is greater than or equal to the [=rank=] of |desc|, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
1868-
1. Let |desc|.{{MLOperandDescriptor/dimensions}}[|axis|] be 0.
1868+
1. Set |desc|.{{MLOperandDescriptor/dimensions}}[|axis|] to 0.
18691869
1. [=map/For each=] |index| in [=the range=] 0 to the [=rank=] of |inputs|, exclusive:
18701870
1. Let |input| be |inputs|[|index|].
18711871
1. If [=validating MLOperand=] given |input| and [=this=] returns false, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
@@ -2402,7 +2402,7 @@ partial interface MLGraphBuilder {
24022402
1. If |a|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dataType}} is not equal to |b|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dataType}}, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
24032403
1. Let |descriptor| be a new {{MLOperandDescriptor}}.
24042404
1. Set |descriptor|.{{MLOperandDescriptor/dataType}} to |a|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dataType}}.
2405-
1. Let |descriptor|.{{MLOperandDescriptor/dimensions}} be the result of running the [=MLGraphBuilder/broadcast-shapes=] steps given |a|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}} and |b|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}.
2405+
1. Set |descriptor|.{{MLOperandDescriptor/dimensions}} to the result of running the [=MLGraphBuilder/broadcast-shapes=] steps given |a|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}} and |b|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}.
24062406
1. If that [=exception/throws=] an error, re-[=exception/throw=] the error.
24072407
1. If any of the following sub-steps fail, [=exception/throw=] an "{{OperationError}}" {{DOMException}}.
24082408
1. Let |output| be the result of [=creating an MLOperand=] given [=this=] and |descriptor|.
@@ -2539,7 +2539,7 @@ Although operations *greaterOrEqual* and *lesserOrEqual* can each be implemented
25392539
1. If |a|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dataType}} is not equal to |b|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dataType}}, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
25402540
1. Let |descriptor| be a new {{MLOperandDescriptor}}.
25412541
1. Set |descriptor|.{{MLOperandDescriptor/dataType}} to {{MLOperandDataType/"uint8"}}.
2542-
1. Let |descriptor|.{{MLOperandDescriptor/dimensions}} be the result of running the [=MLGraphBuilder/broadcast-shapes=] steps given |a|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}} and |b|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}.
2542+
1. Set |descriptor|.{{MLOperandDescriptor/dimensions}} to the result of running the [=MLGraphBuilder/broadcast-shapes=] steps given |a|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}} and |b|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}.
25432543
1. If that [=exception/throws=] an error, re-[=exception/throw=] the error.
25442544
1. If any of the following sub-steps fail, [=exception/throw=] an "{{OperationError}}" {{DOMException}}.
25452545
1. Let |output| be the result of [=creating an MLOperand=] given [=this=] and |descriptor|.
@@ -4876,7 +4876,7 @@ partial interface MLGraphBuilder {
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:
4879-
1. Calculate the output dimensions given |input| and |options|. Let |desc|.{{MLOperandDescriptor/dimensions}} be the result of that.
4879+
1. Calculate the output dimensions given |input| and |options|. Set |desc|.{{MLOperandDescriptor/dimensions}} to that.
48804880
1. Let |output| be the result of [=creating an MLOperand=] given [=this=] and |desc|.
48814881
1. Let |opImpl| be an [=implementation-defined=] platform operator for the |op| pooling operation, given |options|.
48824882
1. Set |output|.{{MLOperand/[[operator]]}} to |opImpl|.
@@ -4949,7 +4949,7 @@ partial interface MLGraphBuilder {
49494949
1. [=Assert=]: the type of |input| and |slope| is {{MLOperand}}.
49504950
1. Let |descriptor| be a new {{MLOperandDescriptor}}.
49514951
1. Set |descriptor|.{{MLOperandDescriptor/dataType}} to |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dataType}}.
4952-
1. Let |descriptor|.{{MLOperandDescriptor/dimensions}} be the result of running the [=MLGraphBuilder/broadcast-shapes=] steps given |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}} and |slope|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}.
4952+
1. Set |descriptor|.{{MLOperandDescriptor/dimensions}} to the result of running the [=MLGraphBuilder/broadcast-shapes=] steps given |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}} and |slope|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}.
49534953
1. If that [=exception/throws=] an error, re-[=exception/throw=] the error.
49544954
1. If any of the following sub-steps fail, [=exception/throw=] an "{{OperationError}}" {{DOMException}}.
49554955
1. Let |output| be the result of [=creating an MLOperand=] given [=this=] and |descriptor|.
@@ -6090,7 +6090,7 @@ partial interface MLGraphBuilder {
60906090
1. If |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dataType}} is not equal to |other|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dataType}}, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
60916091
1. Let |descriptor| be a new {{MLOperandDescriptor}}.
60926092
1. Set |descriptor|.{{MLOperandDescriptor/dataType}} to |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dataType}}.
6093-
1. Let |descriptor|.{{MLOperandDescriptor/dimensions}} be the result of running the [=MLGraphBuilder/broadcast-shapes=] steps given |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}} and |other|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}.
6093+
1. Set |descriptor|.{{MLOperandDescriptor/dimensions}} to the result of running the [=MLGraphBuilder/broadcast-shapes=] steps given |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}} and |other|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}.
60946094
1. If that [=exception/throws=] an error, re-[=exception/throw=] the error.
60956095
1. If |condition| is not unidirectionally broadcastable to |descriptor|.{{MLOperandDescriptor/dimensions}} according to the [[!numpy-broadcasting-rule]], then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
60966096
1. If any of the following sub-steps fail, [=exception/throw=] an "{{OperationError}}" {{DOMException}}.

0 commit comments

Comments
 (0)