Solved by imran in post #2 
              
              
                It resolved. It was small mistake. Visually I was not able to find the difference between 224 and 244. 
A typo in get_transform function: 
transforms.append(T.Resize((224,244)))

I wanted to resize it to (224, 224) instead of (224, 244).