Amortized inference for Bayes nets via stochastic inverses.