Solved by ptrblck in post #4 
              
              
                nn.BCEWithLogitsLoss expects the model output and target to have the same shape. 
Based on the new error message it seems that your model output has a shape of [35], while you are using a single target value only, which won’t work. 
The expected shapes for a mulit-label classification would be [batc…