From 5cb0bf10f77544a3a9128c76a0a2f2ee19656d13 Mon Sep 17 00:00:00 2001 From: Kazuki Adachi Date: Sat, 14 Sep 2024 22:35:24 +0900 Subject: [PATCH] fix error in making y --- tests/ignite/metrics/test_hsic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ignite/metrics/test_hsic.py b/tests/ignite/metrics/test_hsic.py index 5b20a37bb0a..0fcb24f35c9 100644 --- a/tests/ignite/metrics/test_hsic.py +++ b/tests/ignite/metrics/test_hsic.py @@ -140,8 +140,8 @@ def test_integration(self, sigma_x: float, sigma_y: float): for metric_device in metric_devices: x = torch.randn((n_iters * batch_size, n_dims_x)).float().to(device) - lin = nn.Linear(n_dims_x, n_dims_y).to(device) * 100 - y = torch.sin(lin(x)) + torch.randn(n_iters * batch_size, n_dims_y) * 1e-4 + lin = nn.Linear(n_dims_x, n_dims_y).to(device) + y = torch.sin(lin(x) * 100) + torch.randn(n_iters * batch_size, n_dims_y) * 1e-4 def data_loader(i): return x[i * batch_size : (i + 1) * batch_size], y[i * batch_size : (i + 1) * batch_size]