|
if (w <= h and w == size_w) or (h <= w and h == size_h): |
The specific line above will sometimes cause the image to be returned unresized with no warning even when an explicit size (h,w) is given. This will also cause problems to the transform RandomResizedCrop.