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
378a3274
Unverified
Commit
378a3274
authored
Feb 08, 2023
by
Philip Meier
Committed by
GitHub
Feb 08, 2023
Browse files
fix error message if v2 transform is not JIT scriptable (#7196)
parent
1120aa9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
torchvision/prototype/transforms/_transform.py
torchvision/prototype/transforms/_transform.py
+1
-1
No files found.
torchvision/prototype/transforms/_transform.py
View file @
378a3274
...
@@ -130,7 +130,7 @@ class Transform(nn.Module):
...
@@ -130,7 +130,7 @@ class Transform(nn.Module):
# is around.
# is around.
if
self
.
_v1_transform_cls
is
None
:
if
self
.
_v1_transform_cls
is
None
:
raise
RuntimeError
(
raise
RuntimeError
(
f
"Transform
{
type
(
self
.
__name__
)
}
cannot be JIT scripted. "
f
"Transform
{
type
(
self
)
.
__name__
}
cannot be JIT scripted. "
f
"This is only support for backward compatibility with transforms which already in v1."
f
"This is only support for backward compatibility with transforms which already in v1."
f
"For torchscript support (on tensors only), you can use the functional API instead."
f
"For torchscript support (on tensors only), you can use the functional API instead."
)
)
...
...
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