here i have a bug.if i replace  F.nll_loss function by nn.MSE class it works but why?fll_loss should have worked too.(for nll_loss i am modifying target values(you can see it in this example), but for MSE it is not required). please help me why F.nll_loss is not working, and help me to use it in this code(there i am training model cats vs dogs above i flattened image 50503 to grayscale and used neural network (without convolutions), activation function=relu).

image1360×768 33.4 KB