Therefore, if im summarize and group information:


I get loss from my outputs, loss return scalar:
loss1 = lossf1(clf_output[0], label_clf[0])
loss2 = lossf2(reg_output[0], label_reg[0])
loss = loss1 + loss2
*where clf_output[0] or reg_output[0] vectors
and i get error “Function ‘AddmmBackward’ returned nan values in its 2th output.”


Before as i get error, i place loss scalar in tensor with argument (loss = torch.tensor([loss1+loss2], requires_grad=True))


I return to where I came from, model weights are not updated.