* 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)
| 37 | * @doc {heading: 'Operations', subheading: 'Basic math'} |
| 38 | */ |
| 39 | function 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 | } |
| 45 | export const softplus = /* @__PURE__ */ op({softplus_}); |
nothing calls this directly
no test coverage detected
searching dependent graphs…