I am working on a Binary classification problem.  Is it the output shape or target shape that is causing the issue ?
i have printed the target tensor also.
tensor([1, 0, 1, 0, 0, 1, 1, 0, 0, 1])
These are my labels for 10 images in my batch.