Thank you very much, I have solved the problem now, although I don’t know the specific reason. I copy my code to other folder, and change num_workers which in testloader =torch.utils.data.DataLoader(testset, batch_size=4, shuffle=False, num_workers=0) .I don’t even know what happened,it’s work.