Learning compact representation with less (labelled) data from sensors