I assume you are working on a multi-label classification, where each sample might belong to zero, one, or multiple classes?
If so, you could use a threshold and get the predicted label for an active/inactive class as:
out = ...
preds = out > 0.5
# preds would now indicate which class is active (1) or inactive (0) for the sample

In your code snippet your model uses nn.Sigmoid as the last layer, which doesn’t fit the output as it’s negative.
In case you are indeed using nn.Sigmoid, a default threshold of 0.5 could be a good starting point. On the other hand, if your model outputs logits, you could use 0.0 as the default threshold.