priors are normally added semi-implicitly by adding KL loss terms - same way as in VAE
using distribution objects or sampling in __init__ is incorrect. you also need to use rsample() for gradient flows
these changes still won’t be enough for this model, as discrete distributions won’t train without implementing REINFORCE (surrogate loss) - this is something that pyro would handle with less effort