Update README.md
Browse files
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
|