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
1a6038ea
"git@developer.sourcefind.cn:one/TransferBench.git" did not exist on "408752d77a6fadbc6091309893be57d1536bde18"
Commit
1a6038ea
authored
Apr 12, 2018
by
Tongzhou Wang
Committed by
Francisco Massa
Apr 12, 2018
Browse files
Fix for min/max returning 0dim tensors now (#469)
parent
aad3b4ba
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 @
1a6038ea
...
@@ -58,7 +58,7 @@ def make_grid(tensor, nrow=8, padding=2,
...
@@ -58,7 +58,7 @@ def make_grid(tensor, nrow=8, padding=2,
if
range
is
not
None
:
if
range
is
not
None
:
norm_ip
(
t
,
range
[
0
],
range
[
1
])
norm_ip
(
t
,
range
[
0
],
range
[
1
])
else
:
else
:
norm_ip
(
t
,
t
.
min
()
,
t
.
max
())
norm_ip
(
t
,
t
.
min
()
.
item
(),
t
.
max
().
item
())
if
scale_each
is
True
:
if
scale_each
is
True
:
for
t
in
tensor
:
# loop over mini-batch dimension
for
t
in
tensor
:
# loop over mini-batch dimension
...
...
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