Skip to content

Commit

Permalink
use deterministic torch for test_linear_transformation (pytorch#3099)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashishfarmer authored and vfdev-5 committed Dec 4, 2020
1 parent b24ed2e commit b30a49b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/test_transforms_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ def test_linear_transformation(self):
# We skip some tests from _test_transform_vs_scripted_on_batch as
# results for scripted and non-scripted transformations are not exactly the same
torch.manual_seed(12)
torch.set_deterministic(True)
transformed_batch = fn(batch_tensors)
torch.manual_seed(12)
s_transformed_batch = scripted_fn(batch_tensors)
Expand Down

0 comments on commit b30a49b

Please sign in to comment.