A statistical mechanics framework for Bayesian deep neural networks beyond the infinite-width limit - Nature Machine Intelligence