Consistency of Empirical Bayes And Kernel Flow For Hierarchical Parameter Estimation