def softplus_inverse(x, name=None):
with tf.name_scope(name or "<STR_LIT>"):<EOL><INDENT>x = tf.convert_to_tensor(value=x, name="<STR_LIT:x>")<EOL>threshold = np.log(np.finfo(dtype_util.as_numpy_dtype(x.dtype)).eps) + <NUM_LIT><EOL>is_too_small = tf.less(x, np.exp(threshold))<EOL>is_too_large = tf.greater(x, -threshold)<EOL>too_small_value = tf.math.log(x)<EOL>too_large_value = x<EOL>x = tf.where(tf.logical_or(is_too_small, is_too_large), tf.ones_like(x), x)<EOL>y = x + tf.math.log(-tf.math.expm1(-x))  <EOL>return tf.where(is_too_small, too_small_value,<EOL>tf.where(is_too_large, too_large_value, y))<EOL><DEDENT>
Computes the inverse softplus, i.e., x = softplus_inverse(softplus(x)).

    Mathematically this op is equivalent to:

    ```none
    softplus_inverse = log(exp(x) - 1.)
    ```

    Args:
      x: `Tensor`. Non-negative (not enforced), floating-point.
      name: A name for the operation (optional).

    Returns:
      `Tensor`. Has the same type/shape as input `x`.