Bridging Visual Recognition and Synthesis