Deep Representation Learning for Clustering and Domain Adaptation