Thank you for your answer. I see from the code source of RelaxedOneHotCategorical, it uses ExpRelaxedOneHotCategorical, so it shouldn’t suffer from numerical instability ?
I’m reading the paper, appendix C, I’m not very comfortable. From what I understood, the best thing would be to use

image.png1744×180 13 KB

So we should add log p_theta (x|Z) ?