Multi-label classification use cases, where zero, one or multiple classes can be active in each sample, can use nn.BCEWithLogitsLoss as the loss function.
The model output in this case should be [batch_size, nb_classes].
Multi-class classification use cases, where only a single class is active for each sample, would use nn.CrossEntropyLoss.