Multilabel classification model

I want to train a classification model with 16 classes. Each sample can belong to more than one class.
How can I implement it?
In addition, is it possible to define a score (or weight) for each class and for each sample?
For example:
Assume that we deal with three different classes.
If the relation order between some sample to the classes is:
First place = class 2
Second place = class 3
Third place = class 1
Is it possible to express this order by a vector with the following weights? [ 1/3,0.5,1/6 ]
Is it possible to associate different weights for each sample?
I have an implementation for multiclass classification:
model = Classifier()
loss_func = nn.CrossEntropyLoss()

loss = loss_func(prediction, label)

You can use nn.BCEWithLogitsLoss as the criterion for a multi-label classification.

Yes, you can define the class weight tensor and multiply it with the corresponding sample in the unreduced loss (use `reduction=‘none’ while creating the criterion).