@Shani_Gamrian Use BCEWithLogitsLoss -  it’s stable than using a plain Sigmoid followed by aBCELoss` (uses log-sum-exp trick for numerical stability)
see https://github.com/pytorch/pytorch/issues/751 1.1k