Partial disentanglement for domain adaptation