MCPcopy Create free account
hub / github.com/tensorflow/tfjs / softplus_

Function softplus_

tfjs-core/src/ops/softplus.ts:39–44  ·  view source on GitHub ↗

* Computes softplus of the input `tf.Tensor` element-wise: `log(exp(x) + 1)` * * ```js * const x = tf.tensor1d([0, 1, -1, .7]); * * x.softplus().print(); // or tf.softplus(x) * ``` * @param x The input tensor. * * @doc {heading: 'Operations', subheading: 'Basic math'}

(x: T|TensorLike)

Source from the content-addressed store, hash-verified

37 * @doc {heading: 'Operations', subheading: 'Basic math'}
38 */
39function softplus_<T extends Tensor>(x: T|TensorLike): T {
40 const $x = convertToTensor(x, 'x', 'softplus');
41
42 const inputs: SoftplusInputs = {x: $x};
43 return ENGINE.runKernel(Softplus, inputs as unknown as NamedTensorMap);
44}
45export const softplus = /* @__PURE__ */ op({softplus_});

Callers

nothing calls this directly

Calls 2

convertToTensorFunction · 0.90
runKernelMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…