Learning to Recognize Objects by Retaining other Factors of Variation