Learning Lie Groups for Invariant Visual Perception