Commit 1a6038ea authored by Tongzhou Wang's avatar Tongzhou Wang Committed by Francisco Massa
Browse files

Fix for min/max returning 0dim tensors now (#469)

parent aad3b4ba
...@@ -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
......
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