I wasn’t aware of the issue with BCEWithLogitsLoss but torch.round definitely causes your gradients to equal 0 as well. So, make sure to remove torch.round as well to ensure gradient flow to all parameters!