Learning stochastic inverses for amortized inference in Bayesian networks.