Approximate Inference A lgorithms for Two-Layer Bayesian Networks