The ART of Transfer Learning: An Adaptive and Robust Pipeline