View source on GitHub

Returns a CompositeTensor equivalent to the given object.

Note that the returned object will have any Variable, tfp.util.DeferredTensor, or tfp.util.TransformedVariable references it closes over converted to tensors at the time this function is called. The type of the returned object will be a subclass of both CompositeTensor and type(obj).

obj A tfp.distributions.Distribution.

obj A tfp.distributions.Distribution that extends CompositeTensor.