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
c5e9a10d
"git@developer.sourcefind.cn:OpenDAS/mmcv.git" did not exist on "cd96a84add1e850050a746715be0c4763f549c32"
Unverified
Commit
c5e9a10d
authored
Feb 15, 2023
by
Philip Meier
Committed by
GitHub
Feb 15, 2023
Browse files
add error for max_size with size sequence in resize (#7253)
parent
0e0a5dc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
torchvision/prototype/transforms/functional/_geometry.py
torchvision/prototype/transforms/functional/_geometry.py
+5
-0
No files found.
torchvision/prototype/transforms/functional/_geometry.py
View file @
c5e9a10d
...
@@ -148,6 +148,11 @@ def _compute_resized_output_size(
...
@@ -148,6 +148,11 @@ def _compute_resized_output_size(
)
->
List
[
int
]:
)
->
List
[
int
]:
if
isinstance
(
size
,
int
):
if
isinstance
(
size
,
int
):
size
=
[
size
]
size
=
[
size
]
elif
max_size
is
not
None
and
len
(
size
)
!=
1
:
raise
ValueError
(
"max_size should only be passed if size specifies the length of the smaller edge, "
"i.e. size should be an int or a sequence of length 1 in torchscript mode."
)
return
__compute_resized_output_size
(
spatial_size
,
size
=
size
,
max_size
=
max_size
)
return
__compute_resized_output_size
(
spatial_size
,
size
=
size
,
max_size
=
max_size
)
...
...
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