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
23b87603
Unverified
Commit
23b87603
authored
Jul 12, 2021
by
Nicolas Hug
Committed by
GitHub
Jul 12, 2021
Browse files
Catch ValueError due to recent change to torch.testing.assert_close (#4165)
parent
8541c214
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
test/test_models.py
test/test_models.py
+1
-1
No files found.
test/test_models.py
View file @
23b87603
...
...
@@ -108,7 +108,7 @@ def _check_jit_scriptable(nn_module, args, unwrapper=None, skip=False):
tol
=
3e-4
try
:
torch
.
testing
.
assert_close
(
results
,
results_from_imported
,
atol
=
tol
,
rtol
=
tol
)
except
torch
.
testing
.
_asserts
.
Usag
eError
:
except
Valu
eError
:
# custom check for the models that return named tuples:
# we compare field by field while ignoring None as assert_close can't handle None
for
a
,
b
in
zip
(
results
,
results_from_imported
):
...
...
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