How to divide positive samples and negative samples

I want to use the torch. Nn. TripletMarginLoss this API, but I don’t know in the image classification data division method of positive and negative samples, if we now get to the label and the output, how to carry out the positive and negative samples?

Is there a specific code implementation method

Then I am not very clear about the concept of positive sample and negative sample in the image classification, how to be a positive sample, how to be a negative sample