A hierarchical Bayesian learning scheme for autoregressive neural networks