Can someone point me to an example of creating in instance of the Empirical distribution from samples and log_weights? I wrote an ABC method for inferring a latent variable that is hard to infer using standard Pyro solvers. I want to sample my latent from that empirical distribution in a new program.
Small illustration is below, but you might find the tests in test_empirical useful. I’m not sure if you will be able to use this distribution freely inside of SVI though. In particular, it won’t work inside plates, since it lacks a .expand method and the log_prob method cannot score batched samples. Currently, this is only being used to hold the results of inference.