Deep learning for marginal Bayesian posterior inference with recurrent neural networks