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
d8cb7f0a
Commit
d8cb7f0a
authored
Mar 22, 2017
by
Naofumi Tomita
Committed by
Soumith Chintala
Mar 22, 2017
Browse files
Revert "clipping values, and replacing transposes with permute"
This reverts commit
2f579d58
.
parent
2f579d58
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
torchvision/utils.py
torchvision/utils.py
+1
-1
No files found.
torchvision/utils.py
View file @
d8cb7f0a
...
@@ -90,6 +90,6 @@ def save_image(tensor, filename, nrow=8, padding=2,
...
@@ -90,6 +90,6 @@ def save_image(tensor, filename, nrow=8, padding=2,
tensor
=
tensor
.
cpu
()
tensor
=
tensor
.
cpu
()
grid
=
make_grid
(
tensor
,
nrow
=
nrow
,
padding
=
padding
,
grid
=
make_grid
(
tensor
,
nrow
=
nrow
,
padding
=
padding
,
normalize
=
normalize
,
range
=
range
,
scale_each
=
scale_each
)
normalize
=
normalize
,
range
=
range
,
scale_each
=
scale_each
)
ndarr
=
grid
.
mul
(
255
).
clip
(
0
,
255
).
byte
().
permut
e
(
1
,
2
,
0
).
numpy
()
ndarr
=
grid
.
mul
(
255
).
byte
().
transpos
e
(
0
,
2
).
transpose
(
0
,
1
).
numpy
()
im
=
Image
.
fromarray
(
ndarr
)
im
=
Image
.
fromarray
(
ndarr
)
im
.
save
(
filename
)
im
.
save
(
filename
)
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