class_docstr: Bijector which computes `Y = g(X) = Log[1 + exp(X)]`.
  
  The softplus `Bijector` has the following two useful properties:
  
  * The domain is the positive real numbers
  * `softplus(x) approx x`, for large `x`, so it does not overflow as easily as
    the `Exp` `Bijector`.
  
  The optional nonzero `hinge_softness` parameter changes the transition at
  zero.  With `hinge_softness = c`, the bijector is:
  
    ```f_c(x) := c * g(x / c) = c * Log[1 + exp(x / c)].```
  
  For large `x >> 1`, `c * Log[1 + exp(x / c)] approx c * Log[exp(x / c)] = x`,
  so the behavior for large `x` is the same as the standard softplus.
  
  As `c > 0` approaches 0 from the right, `f_c(x)` becomes less and less soft,
  approaching `max(0, x)`.
  
  * `c = 1` is the default.
  * `c > 0` but small means `f(x) approx ReLu(x) = max(0, x)`.
  * `c < 0` flips sign and reflects around the `y-axis`: `f_{-c}(x) = -f_c(-x)`.
  * `c = 0` results in a non-bijective transformation and triggers an exception.
  
    Example Use:
  
    ```python
    # Create the Y=g(X)=softplus(X) transform which works only on Tensors with 1
    # batch ndim and 2 event ndims (i.e., vector of matrices).
    softplus = Softplus()
    x = [[[1., 2],
          [3, 4]],
         [[5, 6],
          [7, 8]]]
    log(1 + exp(x)) == softplus.forward(x)
    log(exp(x) - 1) == softplus.inverse(x)
    ```
  
    Note: log(.) and exp(.) are applied element-wise but the Jacobian is a
    reduction over the event space.
class_docstr_tok: ["Bijector","which","computes","`","Y","=","g","(","X",")","=","Log","[","1","+","exp","(","X",")","]","`",".","The","softplus","`","Bijector","`","has","the","following","two","useful","properties",":","*","The","domain","is","the","positive","real","numbers","*","`","softplus","(","x",")","approx","x","`",",","for","large","`","x","`",",","so","it","does","not","overflow","as","easily","as","the","`","Exp","`","`","Bijector","`",".","The","optional","nonzero","`","hinge_softness","`","parameter","changes","the","transition","at","zero",".","With","`","hinge_softness","=","c","`",",","the","bijector","is",":","``","`","f_c","(","x",")",":","=","c","*","g","(","x","\/","c",")","=","c","*","Log","[","1","+","exp","(","x","\/","c",")","]",".","``","`","For","large","`","x",">",">","1","`",",","`","c","*","Log","[","1","+","exp","(","x","\/","c",")","]","approx","c","*","Log","[","exp","(","x","\/","c",")","]","=","x","`",",","so","the","behavior","for","large","`","x","`","is","the","same","as","the","standard","softplus",".","As","`","c",">","0","`","approaches","0","from","the","right",",","`","f_c","(","x",")","`","becomes","less","and","less","soft",",","approaching","`","max","(","0",",","x",")","`",".","*","`","c","=","1","`","is","the","default",".","*","`","c",">","0","`","but","small","means","`","f","(","x",")","approx","ReLu","(","x",")","=","max","(","0",",","x",")","`",".","*","`","c","<","0","`","flips","sign","and","reflects","around","the","`","y-axis","`",":","`","f_","{","-c","}","(","x",")","=","-f_c","(","-x",")","`",".","*","`","c","=","0","`","results","in","a","non-bijective","transformation","and","triggers","an","exception",".","Example","Use",":","``","`","python","#","Create","the","Y=g","(","X",")","=softplus","(","X",")","transform","which","works","only","on","Tensors","with","1","#","batch","ndim","and","2","event","ndims","(","i.e.",",","vector","of","matrices",")",".","softplus","=","Softplus","(",")","x","=","[","[","[","1.",",","2","]",",","[","3",",","4","]","]",",","[","[","5",",","6","]",",","[","7",",","8","]","]","]","log","(","1","+","exp","(","x",")",")","==","softplus.forward","(","x",")","log","(","exp","(","x",")","-","1",")","==","softplus.inverse","(","x",")","``","`","Note",":","log","(",".",")","and","exp","(",".",")","are","applied","element-wise","but","the","Jacobian","is","a","reduction","over","the","event","space","."]
code: def __init__(
      self,
      hinge_softness=None,
      low=None,
      validate_args=False,
      name="softplus",
  ):
      parameters = dict(locals())
      dtype = None
      if hinge_softness is not None or low is not None:
          dtype = dtype_util.common_dtype(
              [hinge_softness, low], dtype_hint=tf.float32
          )
      with tf.name_scope(name) as name:
          self._hinge_softness = tensor_util.convert_nonref_to_tensor(
              hinge_softness, dtype=dtype, name="hinge_softness"
          )
          self._low = tensor_util.convert_nonref_to_tensor(
              low, dtype=dtype, name="low"
          )
          super(Softplus, self).__init__(
              forward_min_event_ndims=0,
              validate_args=validate_args,
              dtype=dtype,
              parameters=parameters,
              name=name,
          )
  
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.math import generic
label_desc: Use image node_id 1 to create a new Softplus object from inherited base classes: bijector, bijector with example: obj = Softplus(hinge_softness, low, validate_args, name)