Heasterian commited on
Commit
664e70f
·
verified ·
1 Parent(s): ff63da4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -35,7 +35,7 @@ def crop_image_to_nearest_divisible_by_8(img):
35
  new_width = img.shape[2] - (img.shape[2] % 8)
36
 
37
  # Use CenterCrop to crop the image
38
- transform = transforms.CenterCrop(new_height, new_width)
39
  img = transform(img).to(torch.float32).clamp(-1, 1)
40
 
41
  return img
 
35
  new_width = img.shape[2] - (img.shape[2] % 8)
36
 
37
  # Use CenterCrop to crop the image
38
+ transform = transforms.CenterCrop((new_height, new_width), interpolation=transforms.InterpolationMode.BILINEAR)
39
  img = transform(img).to(torch.float32).clamp(-1, 1)
40
 
41
  return img