Solved by my3bikaht in post #2 
              
              
                Binary cross entropy loss compares prediction vs single class, but your model output provides predictions for two classes. 
BCELoss responds with error that you need either to : 
-provide targets per each class ([128,2]), or 
-change your predictions to single class only (model output [128,1], targe…