Solved by ptrblck in post #2 
              
              
                That’s not correct, as nn.BCEWithLogitsLoss expects raw logits as the model output (FloatTensors) and a target tensor with the same shape and type as the output containing values in [0, 1]. 
I’m a bit confused about your use case at the moment. 
If you are dealing with a multi-label classification …