From a38c2b4475959854bcd6cf992312fa9812135816 Mon Sep 17 00:00:00 2001 From: Alex Cunha Date: Mon, 23 Oct 2023 12:47:33 +0000 Subject: [PATCH] fix bug --- tests/test_optim.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_optim.py b/tests/test_optim.py index 2b53a6c37b..38f625fb42 100644 --- a/tests/test_optim.py +++ b/tests/test_optim.py @@ -106,7 +106,7 @@ def fn_base(optimizer, weight, bias): # to a different type and move to a different device. if torch_device == 'cpu': return - elif torch_device == 'cuda' and not torch.cuda.is_available: + elif torch_device == 'cuda' and not torch.cuda.is_available(): return with torch.no_grad():