The Bayesian Method of Tensor Networks