We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f085a0 commit 0e8d422Copy full SHA for 0e8d422
torchvision/utils.py
@@ -65,7 +65,7 @@ def norm_range(t, range):
65
xmaps = min(nrow, nmaps)
66
ymaps = int(math.ceil(float(nmaps) / xmaps))
67
height, width = int(tensor.size(2) + padding), int(tensor.size(3) + padding)
68
- grid = tensor.new(3, height * ymaps, width * xmaps).fill_(0)
+ grid = tensor.new(3, height * ymaps + 1 + padding // 2, width * xmaps + 1 + padding // 2).fill_(0)
69
k = 0
70
for y in irange(ymaps):
71
for x in irange(xmaps):
0 commit comments