|
4629 | 4629 | "rationale": ".algorithm", |
4630 | 4630 | "steps": [ |
4631 | 4631 | { |
4632 | | - "html": "<p>If <var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://webmachinelearning.github.io/webnn/#dom-mlresample2doptions-scales\" id=\"ref-for-dom-mlresample2doptions-scales②\">scales</a></code> does not <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#map-exists\" id=\"ref-for-map-exists⑨②\">exist</a>, set it to the <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#list\" id=\"ref-for-list④③\">list</a> « 1.0, 1.0 ».</p>" |
| 4632 | + "html": "<p>If <var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://webmachinelearning.github.io/webnn/#dom-mlresample2doptions-scales\" id=\"ref-for-dom-mlresample2doptions-scales③\">scales</a></code> does not <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#map-exists\" id=\"ref-for-map-exists⑨②\">exist</a>, set it to the <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#list\" id=\"ref-for-list④③\">list</a> « 1.0, 1.0 ».</p>" |
4633 | 4633 | }, |
4634 | 4634 | { |
4635 | 4635 | "html": "<p>Otherwise, if any of its values is not greater than 0, or if its <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#list-size\" id=\"ref-for-list-size③⑥\">size</a> is not 2, return false.</p>" |
4636 | 4636 | }, |
4637 | 4637 | { |
4638 | | - "html": "<p>If <var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://webmachinelearning.github.io/webnn/#dom-mlresample2doptions-sizes\" id=\"ref-for-dom-mlresample2doptions-sizes②\">sizes</a></code> <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#map-exists\" id=\"ref-for-map-exists⑨③\">exists</a>, and if its size is not 2, or if any of its values is not greater than 0, return false.</p>" |
| 4638 | + "html": "<p>If <var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://webmachinelearning.github.io/webnn/#dom-mlresample2doptions-sizes\" id=\"ref-for-dom-mlresample2doptions-sizes③\">sizes</a></code> <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#map-exists\" id=\"ref-for-map-exists⑨③\">exists</a>, and if its size is not 2, or if any of its values is not greater than 0, return false.</p>" |
4639 | 4639 | }, |
4640 | 4640 | { |
4641 | | - "html": "<p>If <var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://webmachinelearning.github.io/webnn/#dom-mlresample2doptions-axes\" id=\"ref-for-dom-mlresample2doptions-axes③\">axes</a></code> does not <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#map-exists\" id=\"ref-for-map-exists⑨④\">exists</a>, set it to the <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#list\" id=\"ref-for-list④④\">list</a> « 2, 3 ».</p>" |
| 4641 | + "html": "<p>If <var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://webmachinelearning.github.io/webnn/#dom-mlresample2doptions-axes\" id=\"ref-for-dom-mlresample2doptions-axes④\">axes</a></code> does not <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#map-exists\" id=\"ref-for-map-exists⑨④\">exists</a>, set it to the <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#list\" id=\"ref-for-list④④\">list</a> « 2, 3 ».</p>" |
4642 | 4642 | }, |
4643 | 4643 | { |
4644 | | - "html": "<p>Otherwise, if <var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://webmachinelearning.github.io/webnn/#dom-mlresample2doptions-axes\" id=\"ref-for-dom-mlresample2doptions-axes④\">axes</a></code> contains duplicate values, or if any of its elements is not in <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#the-range\" id=\"ref-for-the-range①⓪\">the range</a> 0 to <var>input</var>’s <a data-link-type=\"dfn\" href=\"https://webmachinelearning.github.io/webnn/#mloperand-rank\" id=\"ref-for-mloperand-rank⑥①\">rank</a>, exclusive, then return false.</p>" |
| 4644 | + "html": "<p>Otherwise, if <var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://webmachinelearning.github.io/webnn/#dom-mlresample2doptions-axes\" id=\"ref-for-dom-mlresample2doptions-axes⑤\">axes</a></code> contains duplicate values, or if any of its elements is not in <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#the-range\" id=\"ref-for-the-range①⓪\">the range</a> 0 to <var>input</var>’s <a data-link-type=\"dfn\" href=\"https://webmachinelearning.github.io/webnn/#mloperand-rank\" id=\"ref-for-mloperand-rank⑥①\">rank</a>, exclusive, then return false.</p>" |
4645 | 4645 | }, |
4646 | 4646 | { |
4647 | 4647 | "html": "<p>Return true.</p>" |
|
4660 | 4660 | "html": "<p>Let <var>outputShape</var> be a <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#list-clone\" id=\"ref-for-list-clone①⑦\">clone</a> of <var>inputDescriptor</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://webmachinelearning.github.io/webnn/#dom-mloperanddescriptor-shape\" id=\"ref-for-dom-mloperanddescriptor-shape①③\">shape</a></code>.</p>" |
4661 | 4661 | }, |
4662 | 4662 | { |
4663 | | - "html": "<a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#list-iterate\" id=\"ref-for-list-iterate①③\">For each</a> <var>index</var> in <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#the-range\" id=\"ref-for-the-range①①\">the range</a> 0 to <var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://webmachinelearning.github.io/webnn/#dom-mlresample2doptions-axes\" id=\"ref-for-dom-mlresample2doptions-axes⑤\">axes</a></code>’s <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#list-size\" id=\"ref-for-list-size③⑦\">size</a>, exclusive:", |
| 4663 | + "html": "<a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#list-iterate\" id=\"ref-for-list-iterate①③\">For each</a> <var>index</var> in <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#the-range\" id=\"ref-for-the-range①①\">the range</a> 0 to <var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://webmachinelearning.github.io/webnn/#dom-mlresample2doptions-axes\" id=\"ref-for-dom-mlresample2doptions-axes⑥\">axes</a></code>’s <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#list-size\" id=\"ref-for-list-size③⑦\">size</a>, exclusive:", |
4664 | 4664 | "rationale": "if", |
4665 | 4665 | "steps": [ |
4666 | 4666 | { |
4667 | | - "html": "<p>If <var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://webmachinelearning.github.io/webnn/#dom-mlresample2doptions-sizes\" id=\"ref-for-dom-mlresample2doptions-sizes③\">sizes</a></code> <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#map-exists\" id=\"ref-for-map-exists⑨⑤\">exists</a>, then let <var>size</var> be <var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://webmachinelearning.github.io/webnn/#dom-mlresample2doptions-sizes\" id=\"ref-for-dom-mlresample2doptions-sizes④\">sizes</a></code>[<var>index</var>].</p>" |
| 4667 | + "html": "<p>If <var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://webmachinelearning.github.io/webnn/#dom-mlresample2doptions-sizes\" id=\"ref-for-dom-mlresample2doptions-sizes④\">sizes</a></code> <a data-link-type=\"dfn\" href=\"https://infra.spec.whatwg.org/#map-exists\" id=\"ref-for-map-exists⑨⑤\">exists</a>, then let <var>size</var> be <var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://webmachinelearning.github.io/webnn/#dom-mlresample2doptions-sizes\" id=\"ref-for-dom-mlresample2doptions-sizes⑤\">sizes</a></code>[<var>index</var>].</p>" |
4668 | 4668 | }, |
4669 | 4669 | { |
4670 | | - "html": "<p>Otherwise, let <var>size</var> be floor(<var>input</var>’s <a data-link-type=\"dfn\" href=\"https://webmachinelearning.github.io/webnn/#mloperand-shape\" id=\"ref-for-mloperand-shape⑧③\">shape</a>[<var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://webmachinelearning.github.io/webnn/#dom-mlresample2doptions-axes\" id=\"ref-for-dom-mlresample2doptions-axes⑥\">axes</a></code>[<var>index</var>]] * <var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://webmachinelearning.github.io/webnn/#dom-mlresample2doptions-scales\" id=\"ref-for-dom-mlresample2doptions-scales③\">scales</a></code>[<var>index</var>]).</p>" |
| 4670 | + "html": "<p>Otherwise, let <var>size</var> be floor(<var>input</var>’s <a data-link-type=\"dfn\" href=\"https://webmachinelearning.github.io/webnn/#mloperand-shape\" id=\"ref-for-mloperand-shape⑧③\">shape</a>[<var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://webmachinelearning.github.io/webnn/#dom-mlresample2doptions-axes\" id=\"ref-for-dom-mlresample2doptions-axes⑦\">axes</a></code>[<var>index</var>]] * <var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://webmachinelearning.github.io/webnn/#dom-mlresample2doptions-scales\" id=\"ref-for-dom-mlresample2doptions-scales④\">scales</a></code>[<var>index</var>]).</p>" |
4671 | 4671 | }, |
4672 | 4672 | { |
4673 | 4673 | "html": "<p>If <var>size</var> is not a <a data-link-type=\"dfn\" href=\"https://webmachinelearning.github.io/webnn/#valid-dimension\" id=\"ref-for-valid-dimension①④\">valid dimension</a>, then return failure.</p>" |
4674 | 4674 | }, |
4675 | 4675 | { |
4676 | | - "html": "<p>Set <var>outputShape</var>[<var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://webmachinelearning.github.io/webnn/#dom-mlresample2doptions-axes\" id=\"ref-for-dom-mlresample2doptions-axes⑦\">axes</a></code>[<var>index</var>]] to <var>size</var>.</p>" |
| 4676 | + "html": "<p>Set <var>outputShape</var>[<var>options</var>.<code class=\"idl\"><a data-link-type=\"idl\" href=\"https://webmachinelearning.github.io/webnn/#dom-mlresample2doptions-axes\" id=\"ref-for-dom-mlresample2doptions-axes⑧\">axes</a></code>[<var>index</var>]] to <var>size</var>.</p>" |
4677 | 4677 | } |
4678 | 4678 | ] |
4679 | 4679 | }, |
|
0 commit comments