diff --git a/index.bs b/index.bs index a68c7481..df439dbf 100644 --- a/index.bs +++ b/index.bs @@ -5343,15 +5343,11 @@ partial interface MLGraphBuilder { ### softplus ### {#api-mlgraphbuilder-softplus-method} -Compute the softplus function of the input tensor. The calculation follows the expression `ln(1 + exp(steepness * x)) / steepness`. +Compute the softplus function of the input tensor. The calculation follows the expression `ln(1 + exp(x))`. @@ -5361,28 +5357,18 @@ partial interface MLGraphBuilder { The behavior of this operation can be [EMULATED]
-    return builder.div(
-              builder.log(
-                builder.add(
-                  builder.exp(builder.mul(x, builder.constant(options.steepness))),
-                  builder.constant(1))),
-              builder.constant(options.steepness));
+    return builder.log(
+             builder.add(
+               builder.exp(x),
+               builder.constant(1)));
     
-{{MLSoftplusOptions}} has the following members: -
- : steepness - :: - A scalar parameter. -
- -#### {{MLGraphBuilder/softplus(input, options)}} #### {#api-mlgraphbuilder-softplus-input-options} +#### {{MLGraphBuilder/softplus(input)}} #### {#api-mlgraphbuilder-softplus-input}
**Arguments:** - *input*: an {{MLOperand}}. The input tensor. - - *options*: an optional {{MLSoftplusOptions}}. The optional parameters of the operation. **Returns:** - an {{MLOperand}}. The output tensor of the same shape as *input*. @@ -5390,22 +5376,22 @@ partial interface MLGraphBuilder {
- The softplus(|input|, |options|) method steps are: + The softplus(|input|) method steps are: 1. If [=MLGraphBuilder/validating operand=] with [=this=] and |input| returns false, then [=exception/throw=] a {{TypeError}}. 1. *Make graph connections:* 1. Let |output| be the result of [=copying an MLOperand=] given |input|. - 1. Let |operator| be an [=operator=] for the softplus operation, given |options|. + 1. Let |operator| be an [=operator=] for the softplus operation. 1. Set |output|.{{MLOperand/[[operator]]}} to |operator|. 1. Set |operator|'s [=operator/input=] to |input|. 1. Set |operator|'s [=operator/output=] to |output|. 1. Return |output|.
-#### {{MLGraphBuilder/softplus(options)}} #### {#api-mlgraphbuilder-softplus-options} +#### {{MLGraphBuilder/softplus()}} #### {#api-mlgraphbuilder-softplus}
**Arguments:** - - *options*: an optional {{MLSoftplusOptions}}. The optional parameters of the operation. + - None. **Returns:** - an {{MLActivation}}. The activation function representing the softplus operation. @@ -5413,9 +5399,9 @@ partial interface MLGraphBuilder {
- The softplus(|options|) method steps are: + The softplus() method steps are: - 1. Let |op| be the result of [=creating an MLActivation=] given [=this=], "softplus" and |options|. + 1. Let |op| be the result of [=creating an MLActivation=] given [=this=] and "softplus". 1. Return |op|.