Converts (batch of) scalars to (batch of) positive valued scalars. (deprecated)
tfp.trainable_distributions.softplus_and_shift(
*args,
**kwargs
)
Args:
x
: (Batch of)float
-likeTensor
representing scalars which will be transformed into positive elements.shift
:Tensor
added tosoftplus
transformation of elements. Default value:1e-5
.name
: Aname_scope
name for operations created by this function. Default value:None
(i.e., "positive_tril_with_shift").
Returns:
scale
: (Batch of) scalarswith
x.dtypeand
x.shape`.