Skip to content

Commit

Permalink
add deterministic test seed to easy networks tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cnellington committed Apr 21, 2024
1 parent 38cc018 commit 010ebfc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions contextualized/easy/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def setUp(self):
"""
Shared unit test setup code.
"""
np.random.seed(0)
torch.manual_seed(0)
self.n_samples = 100
self.c_dim = 4
self.x_dim = 5
Expand Down Expand Up @@ -81,6 +83,8 @@ def setUp(self):
"""
Shared unit test setup code.
"""
np.random.seed(0)
torch.manual_seed(0)
self.n_samples = 100
self.c_dim = 4
self.x_dim = 5
Expand Down Expand Up @@ -124,6 +128,8 @@ def setUp(self):
"""
Shared unit test setup code.
"""
np.random.seed(0)
torch.manual_seed(0)
self.n_samples = 100
self.c_dim = 4
self.x_dim = 5
Expand Down

0 comments on commit 010ebfc

Please sign in to comment.