Solved by ptrblck in post #4 
              
              
                I assume your last layer is a convolution layer with a single output channel. 
In that case your model will return logits, which are raw prediction values in the range [-Inf, +Inf]. 
You could map them to a probability in the range [0, 1] by applying a sigmoid on these values. 
In fact, nn.BCEWithLo…