Skip to content

Commit

Permalink
fix accumulator device error
Browse files Browse the repository at this point in the history
  • Loading branch information
kzkadc committed Sep 14, 2024
1 parent 1c0b1a4 commit db6392d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/ignite/metrics/test_hsic.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,12 @@ def test_accumulator_device(self):
for metric_device in metric_devices:
hsic = HSIC(device=metric_device)

for dev in (hsic._device, hsic._sum_of_hsic):
for dev in (hsic._device, hsic._sum_of_hsic.device):
assert dev == metric_device, f"{type(dev)}:{dev} vs {type(metric_device)}:{metric_device}"

x = torch.zeros(10, 10).float()
y = torch.ones(10, 10).float()
hsic.update((x, y))

for dev in (hsic._device, hsic._sum_of_hsic):
for dev in (hsic._device, hsic._sum_of_hsic.device):
assert dev == metric_device, f"{type(dev)}:{dev} vs {type(metric_device)}:{metric_device}"

0 comments on commit db6392d

Please sign in to comment.