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
55b5a6b8
Commit
55b5a6b8
authored
Feb 26, 2019
by
Surgan Jandial
Committed by
Francisco Massa
Feb 26, 2019
Browse files
to_pil_image changes (#762)
parent
22bc44ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
torchvision/transforms/functional.py
torchvision/transforms/functional.py
+1
-1
No files found.
torchvision/transforms/functional.py
View file @
55b5a6b8
...
...
@@ -117,7 +117,7 @@ def to_pil_image(pic, mode=None):
elif
pic
.
ndimension
()
==
2
:
# if 2D image, add channel dimension (CHW)
pic
.
unsqueeze
_
(
0
)
pic
=
pic
.
unsqueeze
(
0
)
elif
isinstance
(
pic
,
np
.
ndarray
):
if
pic
.
ndim
not
in
{
2
,
3
}:
...
...
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