Skip to content

Commit

Permalink
Style: Make grouped algorithm steps consistent
Browse files Browse the repository at this point in the history
For operations defined in bulk - element-wise binary, unary, and
logical ops, plus pooling and reduction ops - make the styling
consistent:

- A single <div class=algorithm-steps> around all definitions
- A separate <div algorithm> around each op's steps.

This was already done for the element-wise ops so already the majority
style. Pooling ops now have just a single "Algorithm" watermark
(instead of 3), and reduction ops now have a watermark instead of
none.

For webmachinelearning#450
  • Loading branch information
inexorabletash committed Feb 16, 2024
1 parent c4c369a commit 539db2d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4487,25 +4487,27 @@ partial interface MLGraphBuilder {
<summary>
The following pooling algorithms are supported.
</summary>
<div algorithm class=algorithm-steps>
<div class=algorithm-steps>
<div algorithm>
The <dfn method for=MLGraphBuilder>averagePool2d(|input|, |options|)</dfn> method steps are:
1. Let |output| be the result of running the [=MLGraphBuilder/pooling-op | create pooling operation=] given "averagePool2d", |input| and |options|.
1. If that [=exception/throws=] an error, then re-[=exception/throw=] the error.
1. Return |output|.
</div>
</div>

<div algorithm class=algorithm-steps>
<div algorithm>
The <dfn method for=MLGraphBuilder>l2Pool2d(|input|, |options|)</dfn> method steps are:
1. Let |output| be the result of running the [=MLGraphBuilder/pooling-op | create pooling operation=] given "l2Pool2d", |input| and |options|.
1. If that [=exception/throws=] an error, then re-[=exception/throw=] the error.
1. Return |output|.
</div>
</div>

<div algorithm class=algorithm-steps>
<div algorithm>
The <dfn method for=MLGraphBuilder>maxPool2d(|input|, |options|)</dfn> method steps are:
1. Let |output| be the result of running the [=MLGraphBuilder/pooling-op | create pooling operation=] given "maxPool2d", |input| and |options|.
1. If that [=exception/throws=] an error, then re-[=exception/throw=] the error.
1. Return |output|.
</div>
</div>
</details>

Expand Down Expand Up @@ -4656,6 +4658,7 @@ partial interface MLGraphBuilder {
<summary>
The following reduce algorithms are supported.
</summary>
<div class=algorithm-steps>
<div algorithm>
The <dfn method for=MLGraphBuilder>reduceL1(|input|, |options|)</dfn> method steps are:
1. Let |output| be the result of running the [=MLGraphBuilder/reduce-op | create reduce operation=] given "reduceL1", |input| and |options|.
Expand Down Expand Up @@ -4725,6 +4728,7 @@ partial interface MLGraphBuilder {
1. If that [=exception/throws=] an error, then re-[=exception/throw=] the error.
1. Return |output|.
</div>
</div>
</details>

### relu ### {#api-mlgraphbuilder-relu-method}
Expand Down

0 comments on commit 539db2d

Please sign in to comment.