I don’t have the time to go through all your code  sorry man. I guess that the training is weird. Limit your training data to only e.g. 10 batches and print the loss after loss=criterion(output,target). If it doesn’t go down, it means that your data/labels aren’t set up properly I believe
GL!