Skip to content

Commit

Permalink
Use 'cpu' for testing balance_by_time
Browse files Browse the repository at this point in the history
  • Loading branch information
sublee committed Nov 9, 2019
1 parent 981d918 commit ff3bab8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def forward(self, x):
assert not model.training

sample = torch.rand(1)
balance_by_time(1, model, sample)
balance_by_time(1, model, sample, device='cpu')

assert not model.training

Expand All @@ -189,7 +189,7 @@ def forward(self, a_b):

model = nn.Sequential(Twin(), Add())
sample = torch.rand(1, requires_grad=True)
balance_by_time(1, model, sample)
balance_by_time(1, model, sample, device='cpu')


@skip_if_no_cuda
Expand Down

0 comments on commit ff3bab8

Please sign in to comment.