as_distribution

tfsnippet.as_distribution(distribution)

Convert a supported type of distribution into Distribution type.

Parameters:distribution – A supported distribution instance. Supported types are: 1. Distribution, 2. zhusuan.distributions.Distribution.
Returns:The wrapped distribution of Distribution type.
Return type:Distribution
Raises:TypeError – If the specified distribution cannot be converted.