Hi Dong!
I haven’t looked at your code, but here are a couple of comments:



 PytorchBeginners:

MY dataset info - training dataset - generalized 300x300 rock/scissors/papers dataset from pytorch


You don’t say how large you training dataset is.  If it’s rather small
it will be easy to overfit, and hard to train your network well enough
to perform well on you validation dataset.
If your training dataset is small, the best thing would be to train
on a larger dataset.  If you can’t get a larger training dataset, you
might be able to get better results by augmenting your training
dataset by including things like flipped and shifted and rescaled
versions of your original images.


My validation dataset is the data taken by some students


If your validation dataset is rather different in character from your
training dataset – and here it might be because it has been collected
differently from your training dataset – even a well-trained network
might perform poorly on your validation dataset.
In an ideal world, you would train your network on a training dataset
and then have perform inference well on rather different images.  But
this isn’t always realistic.
Consider training a cat-dog classifier only on images of short-haired
cats and long-haired dogs.  If you then try to validate it on a dataset
containing only long-haired cats and short-haired dogs, you shouldn’t
be surprised if it does poorly, maybe even systematically mistaking
cats for dogs and vice versa.
I would suggest that you randomly split your original training dataset
in to a smaller training dataset and a separate validation dataset.
You could also combine your original training and validation datasets
into one large dataset, and then randomly split that into a training
and a validation dataset.
Both of these approaches will ensure that your training and validation
datasets have the same character, avoiding the “short-haired cat,
long-haired dog” issue.
Best.
K. Frank