Learning in Compositional Hierarchies: Inducing the Structure of Objects from Data