Commit 55b5a6b8 authored by Surgan Jandial's avatar Surgan Jandial Committed by Francisco Massa
Browse files

to_pil_image changes (#762)

parent 22bc44ed
...@@ -117,7 +117,7 @@ def to_pil_image(pic, mode=None): ...@@ -117,7 +117,7 @@ def to_pil_image(pic, mode=None):
elif pic.ndimension() == 2: elif pic.ndimension() == 2:
# if 2D image, add channel dimension (CHW) # if 2D image, add channel dimension (CHW)
pic.unsqueeze_(0) pic = pic.unsqueeze(0)
elif isinstance(pic, np.ndarray): elif isinstance(pic, np.ndarray):
if pic.ndim not in {2, 3}: if pic.ndim not in {2, 3}:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment