Closed yaochitc closed 5 years ago
Hi @yaochitc, check out the tape
interceptor defined in the edward2 library (I think it's in interceptor.py). There's also an example of using it in the "LDA using edward2" example: https://github.com/tensorflow/probability/blob/master/tensorflow_probability/examples/latent_dirichlet_allocation_edward2.py
ok, thank you.
Tfp provides concepts like RandomVariable to build the probabilistic model, but it seems impossible to access these RVs after the model is built. When I need to sample from the rv in the model(prior or posterior), I'm not sure how to do. I've checked the codes of the model construction, I'm not sure if it is possible to provide a method to get the model structure through the interceptor method(as how the make_log_joint_fn is implemented).