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 d391349 commit 46ffbf1Copy full SHA for 46ffbf1
torchvision/utils.py
@@ -60,9 +60,9 @@ def make_grid(
60
assert isinstance(range, tuple), \
61
"range has to be a tuple (min, max) if specified. min and max are numbers"
62
63
- def norm_ip(img, min, max):
64
- img.clamp_(min=min, max=max)
65
- img.add_(-min).div_(max(max - min, 1e-5))
+ def norm_ip(img, low, high):
+ img.clamp_(min=low, max=high)
+ img.sub_(low).div_(max(high - low, 1e-5))
66
67
def norm_range(t, range):
68
if range is not None:
0 commit comments