Loss.backward() found long, expected float - PyTorch Forums
discuss.pytorch.org › t › loss-backward-found-longMay 19, 2021 · loss = self.weights[0]*self.L1(output[:,0],target[:,0].float())+self.weights[1]*self.CE(output[:,1:3],target[:,1]) miturian May 20, 2021, 7:14am #3