A Bayesian Approach to Learning Single View Generalization in 3D Object Recognition