Skip to content

Commit

Permalink
future-proof single dimension output size calc algorithm names
Browse files Browse the repository at this point in the history
  • Loading branch information
inexorabletash committed Feb 27, 2024
1 parent 2fd03fa commit 2f9868c
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1795,7 +1795,7 @@ partial interface MLGraphBuilder {

<details open algorithm>
<summary>
To <dfn for=MLGraphBuilder>calculate conv2d output size</dfn> given unsigned integers |inputSize|, |filterSize|, |beginningPadding|, |endingPadding|, |stride| and |dilation|, perform these steps. They return a number.
To <dfn for=MLGraphBuilder>calculate conv output size</dfn> given unsigned integers |inputSize|, |filterSize|, |beginningPadding|, |endingPadding|, |stride| and |dilation|, perform these steps. They return a number.
</summary>
<div class=algorithm-steps>
1. Let |effectiveFilterSize| be ( |filterSize| - 1 ) * |dilation| + 1.
Expand All @@ -1804,14 +1804,13 @@ partial interface MLGraphBuilder {
</div>
</details>


<details open algorithm>
<summary>
To <dfn for=MLGraphBuilder>calculate conv2d output sizes</dfn> given unsigned integers |inputHeight|, |inputWidth|, |filterHeight| and |filterWidth|, [=/list=] of 4 unsigned integers |padding|, [=/list=] of 2 unsigned integers |strides|, and [=/list=] of 2 unsigned integers |dilations|, perform these steps. They return a [=/list=] of 2 numbers.
</summary>
<div class=algorithm-steps>
1. Let |outputHeight| be the result of [=MLGraphBuilder/calculating conv2d output size=] given |inputHeight|, |filterHeight|, |padding|[0], |padding|[1], |strides|[0] and |dilations|[0].
1. Let |outputWidth| be the result of [=MLGraphBuilder/calculating conv2d output size=] given |inputWidth|, |filterWidth|, |padding|[2], |padding|[3], |strides|[1] and |dilations|[1].
1. Let |outputHeight| be the result of [=MLGraphBuilder/calculating conv output size=] given |inputHeight|, |filterHeight|, |padding|[0], |padding|[1], |strides|[0] and |dilations|[0].
1. Let |outputWidth| be the result of [=MLGraphBuilder/calculating conv output size=] given |inputWidth|, |filterWidth|, |padding|[2], |padding|[3], |strides|[1] and |dilations|[1].
1. Return « |outputHeight|, |outputWidth| ».
</div>
</details>
Expand Down Expand Up @@ -2007,7 +2006,7 @@ partial interface MLGraphBuilder {

<details open algorithm>
<summary>
To <dfn for=MLGraphBuilder>calculate convtranspose2d output size</dfn> given unsigned integers |inputSize|, |filterSize|, |beginningPadding|, |endingPadding|, |stride|, |dilation|, and |outputPadding|, perform these steps. They return a number.
To <dfn for=MLGraphBuilder>calculate convtranspose output size</dfn> given unsigned integers |inputSize|, |filterSize|, |beginningPadding|, |endingPadding|, |stride|, |dilation|, and |outputPadding|, perform these steps. They return a number.
</summary>
<div class=algorithm-steps>
1. Let |effectiveFilterSize| be ( |filterSize| - 1 ) * |dilation| + 1.
Expand All @@ -2016,19 +2015,17 @@ partial interface MLGraphBuilder {
</div>
</details>


<details open algorithm>
<summary>
To <dfn for=MLGraphBuilder>calculate convtranspose2d output sizes</dfn> given unsigned integers |inputHeight|, |inputWidth|, |filterHeight| and |filterWidth|, [=/list=] of 4 unsigned integers |padding|, [=/list=] of 2 unsigned integers |strides|, [=/list=] of 2 unsigned integers |dilations|, and [=/list=] of 2 unsigned integers |outputPadding|, perform these steps. They return a [=/list=] of 2 numbers.
</summary>
<div class=algorithm-steps>
1. Let |outputHeight| be the result of [=MLGraphBuilder/calculating convtranspose2d output size=] given |inputHeight|, |filterHeight|, |padding|[0], |padding|[1], |strides|[0], |dilations|[0], and |outputPadding|[0].
1. Let |outputWidth| be the result of [=MLGraphBuilder/calculating convtranspose2d output size=] given |inputWidth|, |filterWidth|, |padding|[2], |padding|[3], |strides|[1], |dilations|[1] and |outputPadding|[1].
1. Let |outputHeight| be the result of [=MLGraphBuilder/calculating convtranspose output size=] given |inputHeight|, |filterHeight|, |padding|[0], |padding|[1], |strides|[0], |dilations|[0], and |outputPadding|[0].
1. Let |outputWidth| be the result of [=MLGraphBuilder/calculating convtranspose output size=] given |inputWidth|, |filterWidth|, |padding|[2], |padding|[3], |strides|[1], |dilations|[1] and |outputPadding|[1].
1. Return « |outputHeight|, |outputWidth| ».
</div>
</details>


<details open algorithm>

<summary>
Expand Down

0 comments on commit 2f9868c

Please sign in to comment.