About multi-label classification in pytorch

I am not sure how I represent the training data. For multi labels, should I convert these labels in multi-hot form. That means all images have labels of the same length which corresponds to the class to be classified, Or should I only use the label sequence ? In this way length of labels are various with the different images.
Could anybody give me some suggestion?

For multi-label classification you could use the “multi-hot” form with BCELoss.

Ok, thank you. I will try.

Or, BCEWithLogitsLoss

which combines a Sigmoid layer and the BCELoss in one single class.

ok, thank you!!! I will try it.