Type Ordered
Namespace tensorflow.contrib.distributions.bijectors
Parent Bijector
Interfaces IOrdered
Bijector which maps a tensor x_k that has increasing elements in the last
dimension to an unconstrained tensor y_k. Both the domain and the codomain of the mapping is [-inf, inf], however,
the input of the forward mapping must be strictly increasing.
The inverse of the bijector applied to a normal random vector `y ~ N(0, 1)`
gives back a sorted random vector with the same distribution `x ~ N(0, 1)`
where `x = sort(y)` On the last dimension of the tensor, Ordered bijector performs:
`y[0] = x[0]`
`y[1:] = math_ops.log(x[1:] - x[:-1])` #### Example Use:
Show Example
bijector.Ordered().forward([2, 3, 4]) # Result: [2., 0., 0.] bijector.Ordered().inverse([0.06428002, -1.07774478, -0.71530371]) # Result: [0.06428002, 0.40464228, 0.8936858]