Closed bhargavvader closed 7 years ago
You can replace edward.stats
with scipy.stats
if you only sample from the methods, e.g., bernoulli.rvs
and multivariate_normal.rvs
.
The above raises an error because it also tries to calculate log-densities; these must be written in TensorFlow. In such a case, you'd have to construct Edward random variables and then call their methods. For example in the line that raises the error:
from edward.models import MultivariateNormalFull
multivariate_normal = MultivariateNormalFull(tf.zeros(self.N), self.kernel(x)))
log_prior = multivariate_normal.logpdf(zs['z'])
(Note In practice I don't see this as a use case. Users will either use both deprecated features—edward.stats
and model wrappers—and not only one.)
This makes sense, thanks for the reply! Do you think it's worth rewriting any tutorials to take care of the deprecated features?
Okay, I can see this is already being done, like with the supervised tutorial and the Mixture Density Networks.
Is someone already doing this particularly one?
Not yet. All the tutorials have so far been rewritten in the native language excluding two: the mixture of Gaussians and the mixture density network. There's an outstanding pull request (#350) for these two, which I haven't gotten to work. I welcome any help!
This is mostly with regard to the changes in #344. The example scripts haven't been rewritten to reflect this, and this should be done.
Also, for example, the examples are sometimes broken - in
examples/tf_gp_classification.py
, when you usescipy.stats
toimport bernoulli, multivariate_normal
instead of usingedward.stats
, it throws up this error (and it is because ofscipy.stats
) -