I have taken a look at it, there are a few problems with it.  I suggest the following solutions
First add
transforms.Normalize((0.5,0.5,0.5),(0.5,0.5,0.5))

just before ToTensor in both the train and test transforms.
Step2.
You don’t need to shuffle the test set, I suggest you should just load the test and train sets without using the loops over array,  that is even cleaner.
Step3:
Here is where the real problem is.
The way you compute the average loss and accuracy.
len(data_loader) would return number of batches,  hence you are dividing the total metrics by the number of batches instead of number of examples.
Here is what you need to do,  define
num_images = 0

At each batch iteration do
num_images += inputs.size(0)

Note that inputs.size(0) would give the total images in each batch.
Finally
epoch_loss = running_loss/num_images
epoch_acc = running_acc/num_images

That would give you accurate metrics
Do same in the evaluate function
Also,  torch.save accepts filenames too, you really shouldn’t bother using open