Skip to content

Commit

Permalink
Editorial: Add note about keepDimensions of reduction ops (#648)
Browse files Browse the repository at this point in the history
SHA: 50fbb92
Reason: push, by fdwr

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
inexorabletash and github-actions[bot] committed Apr 19, 2024
1 parent 18d9726 commit 0ec9249
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link href="https://www.w3.org/StyleSheets/TR/2021/W3C-ED" rel="stylesheet">
<meta content="Bikeshed version 82ce88815, updated Thu Sep 7 16:33:55 2023 -0700" name="generator">
<link href="https://www.w3.org/TR/webnn/" rel="canonical">
<meta content="26982c4556255c1cc758e50683fee39e934e8dda" name="document-revision">
<meta content="50fbb92ac633ebfbb6cb814113b1024c4dbb27b3" name="document-revision">
<style>
/* Make <dl> blocks more distinct from their surroundings. */
main dl:not(.switch) {
Expand Down Expand Up @@ -905,7 +905,7 @@
<div class="head">
<p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2021/logos/W3C" width="72"> </a> </p>
<h1 class="p-name no-ref" id="title">Web Neural Network API</h1>
<p id="w3c-state"><a href="https://www.w3.org/standards/types#ED">Editor’s Draft</a>, <time class="dt-updated" datetime="2024-04-18">18 April 2024</time></p>
<p id="w3c-state"><a href="https://www.w3.org/standards/types#ED">Editor’s Draft</a>, <time class="dt-updated" datetime="2024-04-19">19 April 2024</time></p>
<details open>
<summary>More details about this document</summary>
<div data-fill-with="spec-metadata">
Expand Down Expand Up @@ -6939,6 +6939,7 @@ <h4 class="heading settled" data-level="7.8.34" id="api-mlgraphbuilder-reduce"><
</pre>
</details>
</div>
<div class="note" role="note"> Some underlying platforms do not support an option like <code class="idl"><a data-link-type="idl" href="#dom-mlreduceoptions-keepdimensions" id="ref-for-dom-mlreduceoptions-keepdimensions③">keepDimensions</a></code> directly. This does not affect the underlying tensor data, only the shape. For example, if the input shape is <em>[2, 3, 4]</em>, the axis is 1, and <code class="idl"><a data-link-type="idl" href="#dom-mlreduceoptions-keepdimensions" id="ref-for-dom-mlreduceoptions-keepdimensions④">keepDimensions</a></code> is true, the expected output shape is <em>[2, 1 ,4]</em>. If the underlying platform never keeps reduced dimensions it will produce an output shape of <em>[2, 4]</em>. The implementation can introduce a no-op reshape to <em>[2, 1, 4]</em>. A similar no-op reshape can be introduced if <code class="idl"><a data-link-type="idl" href="#dom-mlreduceoptions-keepdimensions" id="ref-for-dom-mlreduceoptions-keepdimensions⑤">keepDimensions</a></code> is false but the underlying platform always keeps reduced dimensions. </div>
<h4 class="heading settled" data-level="7.8.35" id="api-mlgraphbuilder-relu-method"><span class="secno">7.8.35. </span><span class="content">relu</span><a class="self-link" href="#api-mlgraphbuilder-relu-method"></a></h4>
Compute the <a href="https://en.wikipedia.org/wiki/Rectifier_(neural_networks)">rectified linear function</a> of the input tensor.
<pre class="idl highlight def"><c- b>partial</c-> <c- b>interface</c-> <a class="idl-code" data-link-type="interface" href="#mlgraphbuilder" id="ref-for-mlgraphbuilder⑤②"><c- g>MLGraphBuilder</c-></a> {
Expand Down Expand Up @@ -10278,7 +10279,7 @@ <h2 class="no-num no-ref heading settled" id="issues-index"><span class="content
window.dfnpanelData['dom-mlgraphbuilder-prelu'] = {"dfnID": "dom-mlgraphbuilder-prelu", "url": "#dom-mlgraphbuilder-prelu", "dfnText": "prelu(input, slope)", "refSections": [{"refs": [{"id": "ref-for-dom-mlgraphbuilder-prelu"}], "title": "7.8.33. prelu"}], "external": false};
window.dfnpanelData['dictdef-mlreduceoptions'] = {"dfnID": "dictdef-mlreduceoptions", "url": "#dictdef-mlreduceoptions", "dfnText": "MLReduceOptions", "refSections": [{"refs": [{"id": "ref-for-dictdef-mlreduceoptions"}, {"id": "ref-for-dictdef-mlreduceoptions\u2460"}, {"id": "ref-for-dictdef-mlreduceoptions\u2461"}, {"id": "ref-for-dictdef-mlreduceoptions\u2462"}, {"id": "ref-for-dictdef-mlreduceoptions\u2463"}, {"id": "ref-for-dictdef-mlreduceoptions\u2464"}, {"id": "ref-for-dictdef-mlreduceoptions\u2465"}, {"id": "ref-for-dictdef-mlreduceoptions\u2466"}, {"id": "ref-for-dictdef-mlreduceoptions\u2467"}, {"id": "ref-for-dictdef-mlreduceoptions\u2468"}, {"id": "ref-for-dictdef-mlreduceoptions\u2460\u24ea"}, {"id": "ref-for-dictdef-mlreduceoptions\u2460\u2460"}, {"id": "ref-for-dictdef-mlreduceoptions\u2460\u2461"}], "title": "7.8.34. Reduction operations"}], "external": false};
window.dfnpanelData['dom-mlreduceoptions-axes'] = {"dfnID": "dom-mlreduceoptions-axes", "url": "#dom-mlreduceoptions-axes", "dfnText": "axes", "refSections": [{"refs": [{"id": "ref-for-dom-mlreduceoptions-axes"}, {"id": "ref-for-dom-mlreduceoptions-axes\u2460"}, {"id": "ref-for-dom-mlreduceoptions-axes\u2461"}, {"id": "ref-for-dom-mlreduceoptions-axes\u2462"}], "title": "7.8.34. Reduction operations"}], "external": false};
window.dfnpanelData['dom-mlreduceoptions-keepdimensions'] = {"dfnID": "dom-mlreduceoptions-keepdimensions", "url": "#dom-mlreduceoptions-keepdimensions", "dfnText": "keepDimensions", "refSections": [{"refs": [{"id": "ref-for-dom-mlreduceoptions-keepdimensions"}, {"id": "ref-for-dom-mlreduceoptions-keepdimensions\u2460"}, {"id": "ref-for-dom-mlreduceoptions-keepdimensions\u2461"}], "title": "7.8.34. Reduction operations"}], "external": false};
window.dfnpanelData['dom-mlreduceoptions-keepdimensions'] = {"dfnID": "dom-mlreduceoptions-keepdimensions", "url": "#dom-mlreduceoptions-keepdimensions", "dfnText": "keepDimensions", "refSections": [{"refs": [{"id": "ref-for-dom-mlreduceoptions-keepdimensions"}, {"id": "ref-for-dom-mlreduceoptions-keepdimensions\u2460"}, {"id": "ref-for-dom-mlreduceoptions-keepdimensions\u2461"}, {"id": "ref-for-dom-mlreduceoptions-keepdimensions\u2462"}, {"id": "ref-for-dom-mlreduceoptions-keepdimensions\u2463"}, {"id": "ref-for-dom-mlreduceoptions-keepdimensions\u2464"}], "title": "7.8.34. Reduction operations"}], "external": false};
window.dfnpanelData['mlgraphbuilder-calculate-reduction-output-sizes'] = {"dfnID": "mlgraphbuilder-calculate-reduction-output-sizes", "url": "#mlgraphbuilder-calculate-reduction-output-sizes", "dfnText": "calculate reduction output sizes", "refSections": [{"refs": [{"id": "ref-for-mlgraphbuilder-calculate-reduction-output-sizes"}], "title": "7.8.5. argMin/argMax operations"}, {"refs": [{"id": "ref-for-mlgraphbuilder-calculate-reduction-output-sizes\u2460"}], "title": "7.8.34. Reduction operations"}], "external": false};
window.dfnpanelData['mlgraphbuilder-reduce-op'] = {"dfnID": "mlgraphbuilder-reduce-op", "url": "#mlgraphbuilder-reduce-op", "dfnText": "create reduce operation", "refSections": [{"refs": [{"id": "ref-for-mlgraphbuilder-reduce-op"}, {"id": "ref-for-mlgraphbuilder-reduce-op\u2460"}, {"id": "ref-for-mlgraphbuilder-reduce-op\u2461"}, {"id": "ref-for-mlgraphbuilder-reduce-op\u2462"}, {"id": "ref-for-mlgraphbuilder-reduce-op\u2463"}, {"id": "ref-for-mlgraphbuilder-reduce-op\u2464"}, {"id": "ref-for-mlgraphbuilder-reduce-op\u2465"}, {"id": "ref-for-mlgraphbuilder-reduce-op\u2466"}, {"id": "ref-for-mlgraphbuilder-reduce-op\u2467"}, {"id": "ref-for-mlgraphbuilder-reduce-op\u2468"}], "title": "7.8.34. Reduction operations"}], "external": false};
window.dfnpanelData['dom-mlgraphbuilder-reducel1'] = {"dfnID": "dom-mlgraphbuilder-reducel1", "url": "#dom-mlgraphbuilder-reducel1", "dfnText": "reduceL1(input, options)", "refSections": [{"refs": [{"id": "ref-for-dom-mlgraphbuilder-reducel1"}], "title": "7.8.34. Reduction operations"}], "external": false};
Expand Down

0 comments on commit 0ec9249

Please sign in to comment.