Solved by RaLo4 in post #2 
              
              
                I don’t really know what you are trying to do here using BCELoss, so I will guess according to the info you have given. 
Since you said you want to do binary classification and your target is of size torch.Size([10]), I’m guessing it is filled with ones and zeros and you want your network to predict…