ed.models subclass both tensorflow’s
Distribution and edward’s
RandomVariable. This means that most RVs in edward are tensorflow distributions that have explicitly had a random variable class generated from them.
The latter point is also true for RVs specific to edward. For example, the point mass (It’s also how you should define any custom distributions you need).
As you can see, it first defines a
Distribution subclass, then generates a
RandomVariable class from it. So imported distributions just have the latter done to them (which is done here).
The reason for this is that, while distribution defines most useful methods (sample, log_prob, cdf, quantile, etc.), randomvariable enables them to have a tensor representation which allows them to be used as part of the computational graph.