fix module send to cuda
This commit is contained in:
parent
5946e6e1bd
commit
a072b57b50
2 changed files with 1 additions and 3 deletions
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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}")
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue