Thank you for looking into it. I appreciate it. I tried training without computing sigmoid. i.e., commenting line “X = torch.nn.functional.sigmoid(X)”. I get the same behavior. i.e., the loss does not decrease over number of epochs.