TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tfp.trainable_distributions.softplus_and_shift

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

tfp.trainable_distributions.softplus_and_shift(
    *args,
    **kwargs
)

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`.