Skip to content

Commit 3f9f3b3

Browse files
author
Zoltan Kis
committed
Fix steps in resample2d(). Fix typo in conv2d().
Signed-off-by: Zoltan Kis <zoltan.kis@intel.com>
1 parent 18442ad commit 3f9f3b3

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

index.bs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2145,7 +2145,7 @@ partial interface MLGraphBuilder {
21452145
1. Let |filterSize| be the [=list/size=] of |filter|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}.
21462146
1. If |inputSize| is not 4, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
21472147
1. If |filterSize| is not 4, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
2148-
1. If |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/type}} is not the same as {{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/type}}, then [=exception/throw=] a {{TypeError}}.
2148+
1. If |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/type}} is not the same as |filter|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/type}}, then [=exception/throw=] a {{TypeError}}.
21492149
1. If |options|.{{MLConv2dOptions/padding}} does not [=map/exist=], set it to `« 0, 0, 0, 0 »`.
21502150
1. Else if the [=list/size=] of |options|.{{MLConv2dOptions/padding}} is not 4, then [=exception/throw=] a "{{DataError}}" {{DOMException}}.
21512151
1. If |options|.{{MLConv2dOptions/strides}} does not [=map/exist=], set it to `« 1, 1 »`.
@@ -4802,10 +4802,9 @@ partial interface MLGraphBuilder {
48024802
</summary>
48034803
<div class=algorithm-steps>
48044804
1. Let |desc| be an {{MLOperandDescriptor}} initialized to |input|.{{MLOperand/[[descriptor]]}}.
4805-
1. If |options|.{{MLResample2dOptions/sizes}} [=map/exists=], then set |desc|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}} to |options|.{{MLResample2dOptions/sizes}} and return |desc|.
48064805
1. For |index| in [=the range=] 0 to the [=list/size=] of |options|.{{MLResample2dOptions/axes}}, exclusive:
4807-
1. Let |inputSize| be the [=list/size=] of |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}[|index|].
4808-
1. Set |desc|.{{MLOperandDescriptor/dimensions}}[|index|] to |inputSize| multiplied by |options|.{{MLResample2dOptions/scales}}.
4806+
1. If |options|.{{MLResample2dOptions/sizes}} [=map/exists=], set |desc|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}[|options|.{{MLResample2dOptions/axes}}[|index|]] to |options|.{{MLResample2dOptions/sizes}}[|index|] and return |desc|.
4807+
1. Otherwise, set |desc|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}[|options|.{{MLResample2dOptions/axes}}[|index|]] to |input|.{{MLOperand/[[descriptor]]}}.{{MLOperandDescriptor/dimensions}}[|index|] multiplied by |options|.{{MLResample2dOptions/scales}}.
48094808
1. Return |desc|.
48104809
</div>
48114810
</details>

0 commit comments

Comments
 (0)