From a072b57b50e7da7284a16d1d8c9ce6454064f04d Mon Sep 17 00:00:00 2001 From: lucasdelimanogueira Date: Thu, 23 May 2024 03:19:49 -0300 Subject: [PATCH] fix module send to cuda --- norch/nn/module.py | 2 -- tests/test_autograd.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/norch/nn/module.py b/norch/nn/module.py index eaabd9a..cebd86f 100644 --- a/norch/nn/module.py +++ b/norch/nn/module.py @@ -53,8 +53,6 @@ class Module(ABC): def to(self, device): for _, _, parameter in self.parameters(): parameter.to(device) - - return self def state_dict(self): state = OrderedDict() diff --git a/tests/test_autograd.py b/tests/test_autograd.py index 82e6b61..6793816 100644 --- a/tests/test_autograd.py +++ b/tests/test_autograd.py @@ -9,7 +9,7 @@ class TestTensorAutograd(unittest.TestCase): self.device = os.environ.get('device') if self.device is None or self.device != 'cuda': self.device = 'cpu' - + print(f"Running tests on: {self.device}")