From Google translate:

When training and testing, this Avg Accuracy is always 0%, acc is worth, what ’s going on?

Could you post the shape of labels and pred_cls, please?
Also, Variables are deprecated since PyTorch 0.4.0 so you can just use tensors in newer versions. 
PS: I’ve edited your title as well so that more users can have a look.