An Algorithm for Learning Smaller Representations of Models With Scarce Data