Skip to content

Commit

Permalink
Merge pull request #777 from inexorabletash/multiple-assignment
Browse files Browse the repository at this point in the history
SHA: 63e73b3
Reason: push, by huningxin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
huningxin and github-actions[bot] committed Nov 8, 2024
1 parent d09eab5 commit 1c94e49
Showing 1 changed file with 17 additions and 142 deletions.
159 changes: 17 additions & 142 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 742f3d674, updated Mon Nov 4 14:56:54 2024 -0800" name="generator">
<link href="https://www.w3.org/TR/webnn/" rel="canonical">
<meta content="673c6b538dec7282376fbe45ed3648713d4be9ce" name="revision">
<meta content="63e73b3efe12e4d6cf856e3e7d755e01aa92973d" name="revision">
<meta content="dark light" name="color-scheme">
<link href="https://www.w3.org/StyleSheets/TR/2021/dark.css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css">
<style>
Expand Down Expand Up @@ -1018,7 +1018,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-11-06">6 November 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-11-08">8 November 2024</time></p>
<details open>
<summary>More details about this document</summary>
<div data-fill-with="spec-metadata">
Expand Down Expand Up @@ -3222,28 +3222,10 @@ <h4 class="heading settled" data-level="7.7.10" id="api-mlgraphbuilder-conv2d"><
<dl class="switch">
<dt data-md><code class="idl"><a data-link-type="idl" href="#dom-mlinputoperandlayout-nchw" id="ref-for-dom-mlinputoperandlayout-nchw④">"nchw"</a></code>
<dd data-md>
<ol>
<li data-md>
<p>Let <var>batches</var> be <var>inputShape</var>[0].</p>
<li data-md>
<p>Let <var>inputChannels</var> be <var>inputShape</var>[1].</p>
<li data-md>
<p>Let <var>inputHeight</var> be <var>inputShape</var>[2].</p>
<li data-md>
<p>Let <var>inputWidth</var> be <var>inputShape</var>[3].</p>
</ol>
<p>Let « <var>batches</var>, <var>inputChannels</var>, <var>inputHeight</var>, <var>inputWidth</var> » be <var>inputShape</var>.</p>
<dt data-md><code class="idl"><a data-link-type="idl" href="#dom-mlinputoperandlayout-nhwc" id="ref-for-dom-mlinputoperandlayout-nhwc①">"nhwc"</a></code>
<dd data-md>
<ol>
<li data-md>
<p>Let <var>batches</var> be <var>inputShape</var>[0].</p>
<li data-md>
<p>Let <var>inputHeight</var> be <var>inputShape</var>[1].</p>
<li data-md>
<p>Let <var>inputWidth</var> be <var>inputShape</var>[2].</p>
<li data-md>
<p>Let <var>inputChannels</var> be <var>inputShape</var>[3].</p>
</ol>
<p>Let « <var>batches</var>, <var>inputHeight</var>, <var>inputWidth</var>, <var>inputChannels</var> » be <var>inputShape</var>.</p>
</dl>
<li data-md>
<p>Let <var>filterShape</var> be <var>filter</var>’s <a data-link-type="dfn" href="#mloperand-shape" id="ref-for-mloperand-shape①⑧">shape</a>.</p>
Expand All @@ -3252,52 +3234,16 @@ <h4 class="heading settled" data-level="7.7.10" id="api-mlgraphbuilder-conv2d"><
<dl class="switch">
<dt data-md><code class="idl"><a data-link-type="idl" href="#dom-mlconv2dfilteroperandlayout-hwio" id="ref-for-dom-mlconv2dfilteroperandlayout-hwio②">"hwio"</a></code>
<dd data-md>
<ol>
<li data-md>
<p>Let <var>filterHeight</var> be <var>filterShape</var>[0].</p>
<li data-md>
<p>Let <var>filterWidth</var> be <var>filterShape</var>[1].</p>
<li data-md>
<p>Let <var>filterInputChannels</var> be <var>filterShape</var>[2].</p>
<li data-md>
<p>Let <var>outputChannels</var> be <var>filterShape</var>[3].</p>
</ol>
<p>Let « <var>filterHeight</var>, <var>filterWidth</var>, <var>filterInputChannels</var>, <var>outputChannels</var> » be <var>filterShape</var>.</p>
<dt data-md><code class="idl"><a data-link-type="idl" href="#dom-mlconv2dfilteroperandlayout-ohwi" id="ref-for-dom-mlconv2dfilteroperandlayout-ohwi②">"ohwi"</a></code>
<dd data-md>
<ol>
<li data-md>
<p>Let <var>outputChannels</var> be <var>filterShape</var>[0].</p>
<li data-md>
<p>Let <var>filterHeight</var> be <var>filterShape</var>[1].</p>
<li data-md>
<p>Let <var>filterWidth</var> be <var>filterShape</var>[2].</p>
<li data-md>
<p>Let <var>filterInputChannels</var> be <var>filterShape</var>[3].</p>
</ol>
<p>Let « <var>outputChannels</var>, <var>filterHeight</var>, <var>filterWidth</var>, <var>filterInputChannels</var> » be <var>filterShape</var>.</p>
<dt data-md><code class="idl"><a data-link-type="idl" href="#dom-mlconv2dfilteroperandlayout-ihwo" id="ref-for-dom-mlconv2dfilteroperandlayout-ihwo②">"ihwo"</a></code>
<dd data-md>
<ol>
<li data-md>
<p>Let <var>filterInputChannels</var> be <var>filterShape</var>[0].</p>
<li data-md>
<p>Let <var>filterHeight</var> be <var>filterShape</var>[1].</p>
<li data-md>
<p>Let <var>filterWidth</var> be <var>filterShape</var>[2].</p>
<li data-md>
<p>Let <var>outputChannels</var> be <var>filterShape</var>[3].</p>
</ol>
<p>Let « <var>filterInputChannels</var>, <var>filterHeight</var>, <var>filterWidth</var>, <var>outputChannels</var> » be <var>filterShape</var>.</p>
<dt data-md><code class="idl"><a data-link-type="idl" href="#dom-mlconv2dfilteroperandlayout-oihw" id="ref-for-dom-mlconv2dfilteroperandlayout-oihw②">"oihw"</a></code>
<dd data-md>
<ol>
<li data-md>
<p>Let <var>outputChannels</var> be <var>filterShape</var>[0].</p>
<li data-md>
<p>Let <var>filterInputChannels</var> be <var>filterShape</var>[1].</p>
<li data-md>
<p>Let <var>filterHeight</var> be <var>filterShape</var>[2].</p>
<li data-md>
<p>Let <var>filterWidth</var> be <var>filterShape</var>[3].</p>
</ol>
<p>Let « <var>outputChannels</var>, <var>filterInputChannels</var>, <var>filterHeight</var>, <var>filterWidth</var> » be <var>filterShape</var>.</p>
</dl>
<li data-md>
<p>If <var>inputChannels</var> % <var>options</var>.<code class="idl"><a data-link-type="idl" href="#dom-mlconv2doptions-groups" id="ref-for-dom-mlconv2doptions-groups③">groups</a></code> is not 0, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑤⑤">throw</a> a <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#exceptiondef-typeerror" id="ref-for-exceptiondef-typeerror⑤②">TypeError</a></code>.</p>
Expand Down Expand Up @@ -3545,28 +3491,10 @@ <h4 class="heading settled" data-level="7.7.11" id="api-mlgraphbuilder-convtrans
<dl class="switch">
<dt data-md><code class="idl"><a data-link-type="idl" href="#dom-mlinputoperandlayout-nchw" id="ref-for-dom-mlinputoperandlayout-nchw⑦">"nchw"</a></code>
<dd data-md>
<ol>
<li data-md>
<p>Let <var>batches</var> be <var>inputShape</var>[0].</p>
<li data-md>
<p>Let <var>inputChannels</var> be <var>inputShape</var>[1].</p>
<li data-md>
<p>Let <var>inputHeight</var> be <var>inputShape</var>[2].</p>
<li data-md>
<p>Let <var>inputWidth</var> be <var>inputShape</var>[3].</p>
</ol>
<p>Let « <var>batches</var>, <var>inputChannels</var>, <var>inputHeight</var>, <var>inputWidth</var> » be <var>inputShape</var>.</p>
<dt data-md><code class="idl"><a data-link-type="idl" href="#dom-mlinputoperandlayout-nhwc" id="ref-for-dom-mlinputoperandlayout-nhwc④">"nhwc"</a></code>
<dd data-md>
<ol>
<li data-md>
<p>Let <var>batches</var> be <var>inputShape</var>[0].</p>
<li data-md>
<p>Let <var>inputHeight</var> be <var>inputShape</var>[1].</p>
<li data-md>
<p>Let <var>inputWidth</var> be <var>inputShape</var>[2].</p>
<li data-md>
<p>Let <var>inputChannels</var> be <var>inputShape</var>[3].</p>
</ol>
<p>Let « <var>batches</var>, <var>inputHeight</var>, <var>inputWidth</var>, <var>inputChannels</var> » be <var>inputShape</var>.</p>
</dl>
<li data-md>
<p>Let <var>filterShape</var> be <var>filter</var>’s <a data-link-type="dfn" href="#mloperand-shape" id="ref-for-mloperand-shape②①">shape</a>.</p>
Expand All @@ -3575,40 +3503,13 @@ <h4 class="heading settled" data-level="7.7.11" id="api-mlgraphbuilder-convtrans
<dl class="switch">
<dt data-md><code class="idl"><a data-link-type="idl" href="#dom-mlconvtranspose2dfilteroperandlayout-iohw" id="ref-for-dom-mlconvtranspose2dfilteroperandlayout-iohw①">"iohw"</a></code>
<dd data-md>
<ol>
<li data-md>
<p>Let <var>filterInputChannels</var> be <var>filterShape</var>[0].</p>
<li data-md>
<p>Let <var>filterOutputChannels</var> be |filterShape[1].</p>
<li data-md>
<p>Let <var>filterHeight</var> be <var>filterShape</var>[2].</p>
<li data-md>
<p>Let <var>filterWidth</var> be <var>filterShape</var>[3].</p>
</ol>
<p>Let « <var>filterInputChannels</var>, <var>filterOutputChannels</var>, <var>filterHeight</var>, <var>filterWidth</var> » be <var>filterShape</var>.</p>
<dt data-md><code class="idl"><a data-link-type="idl" href="#dom-mlconvtranspose2dfilteroperandlayout-hwoi" id="ref-for-dom-mlconvtranspose2dfilteroperandlayout-hwoi①">"hwoi"</a></code>
<dd data-md>
<ol>
<li data-md>
<p>Let <var>filterHeight</var> be <var>filterShape</var>[0].</p>
<li data-md>
<p>Let <var>filterWidth</var> be <var>filterShape</var>[1].</p>
<li data-md>
<p>Let <var>filterOutputChannels</var> be |filterShape[2].</p>
<li data-md>
<p>Let <var>filterInputChannels</var> be <var>filterShape</var>[3].</p>
</ol>
<p>Let « <var>filterHeight</var>, <var>filterWidth</var>, <var>filterOutputChannels</var>, <var>filterInputChannels</var> » be <var>filterShape</var>.</p>
<dt data-md><code class="idl"><a data-link-type="idl" href="#dom-mlconvtranspose2dfilteroperandlayout-ohwi" id="ref-for-dom-mlconvtranspose2dfilteroperandlayout-ohwi①">"ohwi"</a></code>
<dd data-md>
<ol>
<li data-md>
<p>Let <var>filterOutputChannels</var> be |filterShape[0].</p>
<li data-md>
<p>Let <var>filterHeight</var> be <var>filterShape</var>[1].</p>
<li data-md>
<p>Let <var>filterWidth</var> be <var>filterShape</var>[2].</p>
<li data-md>
<p>Let <var>filterInputChannels</var> be <var>filterShape</var>[3].</p>
</ol>
<p>Let « <var>filterOutputChannels</var>, <var>filterHeight</var>, <var>filterWidth</var>, <var>filterInputChannels</var> » be <var>filterShape</var>.</p>
</dl>
<li data-md>
<p>If <var>inputChannels</var> is not equal to <var>filterInputChannels</var>, then <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-throw" id="ref-for-dfn-throw⑦⑤">throw</a> a <code class="idl"><a data-link-type="idl" href="https://webidl.spec.whatwg.org/#exceptiondef-typeerror" id="ref-for-exceptiondef-typeerror⑦①">TypeError</a></code>.</p>
Expand Down Expand Up @@ -7377,46 +7278,20 @@ <h4 class="heading settled" data-level="7.7.32" id="api-mlgraphbuilder-pool2d"><
<dl class="switch">
<dt data-md><code class="idl"><a data-link-type="idl" href="#dom-mlinputoperandlayout-nchw" id="ref-for-dom-mlinputoperandlayout-nchw①④">"nchw"</a></code>
<dd data-md>
<ol>
<li data-md>
<p>Let <var>batches</var> be <var>inputShape</var>[0].</p>
<li data-md>
<p>Let <var>channels</var> be <var>inputShape</var>[1].</p>
<li data-md>
<p>Let <var>inputHeight</var> be <var>inputShape</var>[2].</p>
<li data-md>
<p>Let <var>inputWidth</var> be <var>inputShape</var>[3].</p>
</ol>
<p>Let « <var>batches</var>, <var>channels</var>, <var>inputHeight</var>, <var>inputWidth</var> » be <var>inputShape</var>.</p>
<dt data-md><code class="idl"><a data-link-type="idl" href="#dom-mlinputoperandlayout-nhwc" id="ref-for-dom-mlinputoperandlayout-nhwc⑦">"nhwc"</a></code>
<dd data-md>
<ol>
<li data-md>
<p>Let <var>batches</var> be <var>inputShape</var>[0].</p>
<li data-md>
<p>Let <var>inputHeight</var> be <var>inputShape</var>[1].</p>
<li data-md>
<p>Let <var>inputWidth</var> be <var>inputShape</var>[2].</p>
<li data-md>
<p>Let <var>channels</var> be <var>inputShape</var>[3].</p>
</ol>
<p>Let « <var>batches</var>, <var>inputHeight</var>, <var>inputWidth</var>, <var>channels</var> » be <var>inputShape</var>.</p>
</dl>
<li data-md>
<p>If <var>outputSizes</var> is not given, then:</p>
<ol>
<li data-md>
<p>Let <var>outputHeight</var> be <var>outputSizes</var>[0].</p>
<li data-md>
<p>Let <var>outputWidth</var> be <var>outputSizes</var>[1].</p>
</ol>
<p>If <var>outputSizes</var> is given, then let « <var>outputHeight</var>, <var>outputWidth</var> » be <var>outputSizes</var>.</p>
<li data-md>
<p>Otherwise:</p>
<ol>
<li data-md>
<p>Let <var>outputSizes</var> be the result of <a data-link-type="dfn" href="#mlgraphbuilder-calculate-conv2d-output-sizes" id="ref-for-mlgraphbuilder-calculate-conv2d-output-sizes①">calculating conv2d output sizes</a> given <var>inputHeight</var>, <var>inputWidth</var>, <var>windowDimensions</var>[0], <var>windowDimensions</var>[1], <var>padding</var>, <var>strides</var>, and <var>dilations</var>.</p>
<li data-md>
<p>Let <var>outputHeight</var> be <var>outputSizes</var>[0].</p>
<li data-md>
<p>Let <var>outputWidth</var> be <var>outputSizes</var>[1].</p>
<p>Let « <var>outputHeight</var>, <var>outputWidth</var> » be <var>outputSizes</var>.</p>
<li data-md>
<p>Switch on <var>roundingType</var>:</p>
<dl class="switch">
Expand Down

0 comments on commit 1c94e49

Please sign in to comment.