Update README.md
Browse files
README.md
CHANGED
@@ -56,6 +56,11 @@ with torch.no_grad():
|
|
56 |
)(img).unsqueeze(0)
|
57 |
img_tensor = img_tensor.to(device)
|
58 |
|
|
|
|
|
|
|
|
|
|
|
59 |
output = model(img_tensor)
|
60 |
|
61 |
```
|
|
|
56 |
)(img).unsqueeze(0)
|
57 |
img_tensor = img_tensor.to(device)
|
58 |
|
59 |
+
if img_tensor.shape[2] % 8 != 0:
|
60 |
+
img_tensor = img_tensor[:, :, : -(img_tensor.shape[2] % 8), :]
|
61 |
+
if img_tensor.shape[3] % 8 != 0:
|
62 |
+
img_tensor = img_tensor[:, :, :, : -(img_tensor.shape[3] % 8)]
|
63 |
+
|
64 |
output = model(img_tensor)
|
65 |
|
66 |
```
|