nn.BCEWithLogitsLoss expects logits as the model output, not probabilities.
Internally, this loss function will be used (taken from the docs and just removed the weight):

-[y_n​⋅logσ(x_n​)+(1−y_n​)⋅log(1−σ(x_n​))]

If you pass x_n as 0, we can simplify the formula to:

-[y_n​⋅log(0.5)+(1−y_n​)⋅log(0.5)]

using the fact that sigmoid(0.) = 0.5. Further we’ll get:

-log(0.5) * [y_n + 1 - y_n] = -log(0.5) = 0.6931

If you would like to pass the input as probabilities, use nn.BCELoss instead.