Pytorch Weighted Gpa Definition