Learning image representations tied to ego-motion