Closed ljlin closed 1 month ago
Hi, were you able to find a solution to this issue? I am having similar issues with a phylogenetics model
HMC does not work with discrete latent variables. (with enumeration, discrete latent variables will be marginalized out so HMC can still work.)
HMC does not work with discrete latent variables. (with enumeration, discrete latent variables will be marginalized out so HMC can still work.)
Thanks. Do you have an idea on which inference algorithm in Numpyro would work if I want to sample discrete variables? As far as I have tried SVI doesn’t work
I guess you could try DiscreteHMCGibbs.
Please use our forum https://forum.pyro.ai/ for questions. We mainly use github for tracking bugs and feature requests.
I am trying to implement a CRBD model, which contains both continuous and discrete random variables, described in this paper.-,Algorithm%202,-Basic%20birth%2Ddeath) and apply HMC to it.
But I got a runtime error that says
Is this I use Pyro's HMC in the wrong way, or it's Pyro's HMC not compatible with
{'enumerate': 'sequential'}
?What should I do to apply HMC together with
{'enumerate': 'sequential'}
to this CRBD model?Thanks for helping.
Code: