Hi Alice!
Let me answer your question(s) two different ways.



 Alice_NL:

Can I then transform logits to probabilities by a new network model


You could, but doing so would be overkill.  You can just call the
function (or class) version of sigmoid() directly:
my_logits = my_model (my_batch)
with torch.no_grad():
    my_probabilities = torch.nn.functional.sigmoid (my_logits)
    # or instantiate Sigmoid function obejct on the fly and call it
    # my_probabilities = torch.nn.Sigmoid() (my_logits)

There is no need to wrap sigmoid() in a “mini-model” in order to
apply it to my_logits.


calculate accuracy on the validation set?


You generally don’t need the actual probabilities to calculate the
accuracy of your validation-set predictions.  You just need to turn
the logits into binary yes/no predictions.
Also, you may want to calculate the validation-set loss, as well.
Something like:
# assumes loss_criterion = BCEWithLogitsLoss (...)
with torch.no_grad():   # don't want or need gradients for validation calculations
    val_logits = my_model (val_batch)
    val_loss = loss_criterion (val_logits, val_targets)
    # do something with val_loss
    #
    # assumes that val_targets are exactly 0.0 and 1.0
    val_binary_preds = (val_logits > 0.0).float()
    num_correct = (val_binary_preds == val_targets).sum()
    # use num_correct to calculate average validation accuracy, etc.

Note, that a logit of zero corresponds to a probability of one half.
(sigmoid (0.0) == 0.5.)  So thresholding logits against 0.0 gives
the same results as thresholding the corresponding probabilities
against 0.5, the idea being that probability > 0.5 means “yes”
(and probability <= 0.5 means “no”).
Best.
K. Frank