Solved by ptrblck in post #2 
              
              
                I assume multi-target refers to a multi-class classification, i.e. each sample corresponds to one target only. 
If that’s the case, you could create the last linear layer with out_features=nb_classes, such that each sample will yield the logits for all classes. 
For the criterion you could use nn.Cr…