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
39f6abe9
"docs/vscode:/vscode.git/clone" did not exist on "bf211dacb1509e3e7aa9c04a5f1b9c1a6220902b"
Unverified
Commit
39f6abe9
authored
Jan 27, 2020
by
Francisco Massa
Committed by
GitHub
Jan 27, 2020
Browse files
Fix interpolate when no scale_factor is passed (#1785)
parent
5ac5ab9e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
torchvision/ops/misc.py
torchvision/ops/misc.py
+2
-1
No files found.
torchvision/ops/misc.py
View file @
39f6abe9
...
...
@@ -77,7 +77,8 @@ def _check_size_scale_factor(dim, size, scale_factor):
raise
ValueError
(
"either size or scale_factor should be defined"
)
if
size
is
not
None
and
scale_factor
is
not
None
:
raise
ValueError
(
"only one of size or scale_factor should be defined"
)
if
not
(
scale_factor
is
not
None
and
len
(
scale_factor
)
!=
dim
):
if
scale_factor
is
not
None
and
isinstance
(
scale_factor
,
tuple
)
\
and
len
(
scale_factor
)
!=
dim
:
raise
ValueError
(
"scale_factor shape must match input shape. "
"Input is {}D, scale_factor size is {}"
.
format
(
dim
,
len
(
scale_factor
))
...
...
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