Skip to content

Commit

Permalink
[Follow-up] Fix a tiny bug in tests of Improvement in RunningAverage (#…
Browse files Browse the repository at this point in the history
…2982)

* Fix the bug

* Update Pillow usages
  • Loading branch information
sadra-barikbin committed Jul 3, 2023
1 parent 193643c commit 35a2da3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/fast_neural_style/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
def load_image(filename, size=None, scale=None):
img = Image.open(filename)
if size is not None:
img = img.resize((size, size), Image.ANTIALIAS)
img = img.resize((size, size), Image.LANCZOS)
elif scale is not None:
img = img.resize((int(img.size[0] / scale), int(img.size[1] / scale)), Image.ANTIALIAS)
img = img.resize((int(img.size[0] / scale), int(img.size[1] / scale)), Image.LANCZOS)
return img


Expand Down
2 changes: 1 addition & 1 deletion tests/ignite/metrics/test_running_average.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def test_integration_batchwise(usage):
n_classes = 10
max_epochs = 3
data = list(range(n_iters))
loss = torch.arange(n_iters)
loss = torch.arange(n_iters, dtype=torch.float)
y_true = torch.randint(0, n_classes, size=(n_iters, batch_size))
y_pred = torch.rand(n_iters, batch_size, n_classes)

Expand Down

0 comments on commit 35a2da3

Please sign in to comment.