Learning Action-based Representations Using Invariance