fix module send to cuda

This commit is contained in:
lucasdelimanogueira 2024-05-23 03:19:49 -03:00
parent 5946e6e1bd
commit a072b57b50
2 changed files with 1 additions and 3 deletions

View file

@ -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()

View file

@ -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}")