softplus function

Tensor<Vector> softplus(
  1. Tensor<Vector> v
)

///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////

Implementation

// COMPOSITE OPERATIONS
////////////////////////////////////////////////////////////////////////////////

// This is a composite function; it doesn't create its own Node,
// so it doesn't need changes. The GraphCopier will copy the
// primitive operations it's made of.
Tensor<Vector> softplus(Tensor<Vector> v) {
  return vectorLog(addScalar(vectorExp(v), 1.0));
}