How to feed ranked multiple labels for a single image to a supervised training pipeline

In supervised learning for image classification, we feed the training images with its labels. Is it possible for each image, can I provide a series of label ranked in the order of relatedness instead of just one label?

I am using PyTorch for this supervised training. Right now, under each label, I have my training images for that label. Can anyone plz help me saying how can I implement ranked multi-label image training in PyTorch?