Labels for training data

How do I get the labels for the training data such that they correspond to the reference data?