TensorFlow 2.0 RC is available Learn more

tfp.trainable_distributions.softplus_and_shift

Converts (batch of) scalars to (batch of) positive valued scalars.

tfp.trainable_distributions.softplus_and_shift(
    x,
    shift=1e-05,
    name=None
)

Defined in python/trainable_distributions/trainable_distributions_lib.py.

Args:

  • x: (Batch of) float-like Tensor representing scalars which will be transformed into positive elements.
  • shift: Tensor added to softplus transformation of elements. Default value: 1e-5.
  • name: A name_scope name for operations created by this function. Default value: None (i.e., "positive_tril_with_shift").

Returns:

  • scale: (Batch of) scalarswithx.dtypeandx.shape`.