Solved by sai_tharun in post #2 
              
              
                This is because of the loss function. 
cross entropy doesnt accept the one hot encoding of the target variables. 
Place the below code before loss =loss1+loss2 
labels1,labels2 = labels[:, 0], labels[:, 1] 
targetnp=labels1.cpu().numpy()
targetnp1 = labels2.cpu().numpy()
l1=np.where(targetnp>0)[1]
l…