Skip to content

Commit

Permalink
Merge pull request webmachinelearning#619 from inexorabletash/bugfix-…
Browse files Browse the repository at this point in the history
…activation-vending

Bugfix: Drop "re-throw" in MLActivation creation steps
  • Loading branch information
huningxin authored Mar 25, 2024
2 parents 91cb734 + c6ee63a commit 2f32429
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1164,9 +1164,6 @@ interface MLActivation {};
::
The {{MLActivation}}'s name.
: <dfn>\[[builder]]</dfn> of type {{MLGraphBuilder}}
::
The graph builder object this {{MLActivation}} belongs to.
: <dfn>\[[options]]</dfn> of type [=ordered map=]
::
A dictionary containing {{MLActivation}} options.
: <dfn>\[[operator]]</dfn> of type [=operator=]
Expand All @@ -1186,16 +1183,13 @@ The {{MLActivation}} objects (including the ones passed as input to methods) are

<details open algorithm>
<summary>
To <dfn>create an MLActivation</dfn> given {{MLGraphBuilder}} |builder|, [=string=] |name|, optional [=ordered map=] |options| and optional algorithm |init-steps|, run the following steps:
To <dfn>create an MLActivation</dfn> given {{MLGraphBuilder}} |builder|, [=string=] |name| and optional [=ordered map=] |options|, run the following steps:
</summary>
1. Let |activation| be a new {{MLActivation}}.
1. Set |activation|.{{MLActivation/[[builder]]}} to |builder|.
1. Set |activation|.{{MLActivation/[[name]]}} to |name|.
1. If |options| is given, set |activation|.{{MLActivation/[[options]]}} to |options|.
1. Let |operator| be an [=operator=] for the |name| operation.
1. Let |operator| be an [=operator=] for the |name| operation, given |options|.
1. Set |activation|.{{MLActivation/[[operator]]}} to |operator|.
1. If |init-steps| are given, run |init-steps| with |options|.
1. Otherwise, initialize |activation|.{{MLActivation/[[operator]]}} given |options| in an [=implementation-defined=] way for the given |name| operation.
1. Return |activation|.
</details>

Expand Down Expand Up @@ -1721,7 +1715,6 @@ partial interface MLGraphBuilder {
</summary>
1. If [=checking clamp options=] given |options| returns false, then [=exception/throw=] a {{TypeError}}.
1. Let |op| be the result of [=creating an MLActivation=] given [=this=], "clamp" and |options|.
1. If that [=exception/throws=] an error, re-[=exception/throw=] the error.
1. Return |op|.
</details>

Expand Down Expand Up @@ -3373,7 +3366,6 @@ partial interface MLGraphBuilder {
The <dfn method for=MLGraphBuilder>hardSigmoid(|options|)</dfn> method steps are:
</summary>
1. Let |op| be the result of [=creating an MLActivation=] given [=this=], "hardSigmoid" and |options|.
1. If that [=exception/throws=] an error, re-[=exception/throw=] the error.
1. Return |op|.
</details>

Expand Down Expand Up @@ -3445,7 +3437,6 @@ partial interface MLGraphBuilder {
The <dfn method for=MLGraphBuilder id=hardswish-noargs>hardSwish()</dfn> method steps are:
</summary>
1. Let |op| be the result of [=creating an MLActivation=] given [=this=] and "hardSwish".
1. If that [=exception/throws=] an error, re-[=exception/throw=] the error.
1. Return |op|.
</details>

Expand Down Expand Up @@ -3726,7 +3717,6 @@ partial interface MLGraphBuilder {
The <dfn method for=MLGraphBuilder>leakyRelu(|options|)</dfn> method steps are:
</summary>
1. Let |op| be the result of [=creating an MLActivation=] given [=this=], "leakyRelu" and |options|.
1. If that [=exception/throws=] an error, re-[=exception/throw=] the error.
1. Return |op|.
</details>

Expand Down Expand Up @@ -3809,7 +3799,6 @@ partial interface MLGraphBuilder {
The <dfn method for=MLGraphBuilder>linear(|options|)</dfn> method steps are:
</summary>
1. Let |op| be the result of [=creating an MLActivation=] given [=this=], "linear" and |options|.
1. If that [=exception/throws=] an error, re-[=exception/throw=] the error.
1. Return |op|.
</details>

Expand Down Expand Up @@ -4922,7 +4911,6 @@ partial interface MLGraphBuilder {
The <dfn method for=MLGraphBuilder id=relu-noargs>relu()</dfn> method steps are:
</summary>
1. Let |op| be the result of [=creating an MLActivation=] given [=this=] and "relu".
1. If that [=exception/throws=] an error, re-[=exception/throw=] the error.
1. Return |op|.
</details>

Expand Down Expand Up @@ -5158,7 +5146,6 @@ partial interface MLGraphBuilder {
The <dfn method for=MLGraphBuilder id=sigmoid-noargs>sigmoid()</dfn> method steps are:
</summary>
1. Let |op| be the result of [=creating an MLActivation=] given [=this=] and "sigmoid".
1. If that [=exception/throws=] an error, re-[=exception/throw=] the error.
1. Return |op|.
</details>

Expand Down Expand Up @@ -5265,7 +5252,6 @@ partial interface MLGraphBuilder {
The <dfn method for=MLGraphBuilder id=softmax-noargs>softmax()</dfn> method steps are:
</summary>
1. Let |op| be the result of [=creating an MLActivation=] given [=this=] and "softmax".
1. If that [=exception/throws=] an error, re-[=exception/throw=] the error.
1. Return |op|.
</details>

Expand Down Expand Up @@ -5346,7 +5332,6 @@ partial interface MLGraphBuilder {
The <dfn method for=MLGraphBuilder>softplus(|options|)</dfn> method steps are:
</summary>
1. Let |op| be the result of [=creating an MLActivation=] given [=this=], "softplus" and |options|.
1. If that [=exception/throws=] an error, re-[=exception/throw=] the error.
1. Return |op|.
</details>

Expand Down Expand Up @@ -5410,7 +5395,6 @@ partial interface MLGraphBuilder {
The <dfn method for=MLGraphBuilder id=softsign-noargs>softsign()</dfn> method steps are:
</summary>
1. Let |op| be the result of [=creating an MLActivation=] given [=this=] and "softsign".
1. If that [=exception/throws=] an error, re-[=exception/throw=] the error.
1. Return |op|.
</details>

Expand Down Expand Up @@ -5558,7 +5542,6 @@ partial interface MLGraphBuilder {
The <dfn method for=MLGraphBuilder id=tanh-noargs>tanh()</dfn> method steps are:
</summary>
1. Let |op| be the result of [=creating an MLActivation=] given [=this=] and "tanh".
1. If that [=exception/throws=] an error, re-[=exception/throw=] the error.
1. Return |op|.
</details>

Expand Down

0 comments on commit 2f32429

Please sign in to comment.