Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
e2e323cc
Unverified
Commit
e2e323cc
authored
Dec 03, 2020
by
Ashish Farmer
Committed by
GitHub
Dec 03, 2020
Browse files
use deterministic torch for test_linear_transformation (#3099)
parent
7f1a05a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
test/test_transforms_tensor.py
test/test_transforms_tensor.py
+1
-0
No files found.
test/test_transforms_tensor.py
View file @
e2e323cc
...
@@ -452,6 +452,7 @@ class Tester(TransformsTester):
...
@@ -452,6 +452,7 @@ class Tester(TransformsTester):
# We skip some tests from _test_transform_vs_scripted_on_batch as
# We skip some tests from _test_transform_vs_scripted_on_batch as
# results for scripted and non-scripted transformations are not exactly the same
# results for scripted and non-scripted transformations are not exactly the same
torch
.
manual_seed
(
12
)
torch
.
manual_seed
(
12
)
torch
.
set_deterministic
(
True
)
transformed_batch
=
fn
(
batch_tensors
)
transformed_batch
=
fn
(
batch_tensors
)
torch
.
manual_seed
(
12
)
torch
.
manual_seed
(
12
)
s_transformed_batch
=
scripted_fn
(
batch_tensors
)
s_transformed_batch
=
scripted_fn
(
batch_tensors
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment