This would be your proposed approach, if I understand it correctly, and I just tried to clarify the workflow.
For a “standard” multi-class classification, you would just use an output layer which returns nb_classes logits (e.g. via nn.Linear(in_features, nb_classes)).