From 0b95bb1e62785bd37e92350045e55f09028cdb43 Mon Sep 17 00:00:00 2001 From: Dmitry Ulyanov Date: Thu, 23 Mar 2017 23:40:06 +0300 Subject: [PATCH 1/3] Make clearer about nrow parameter in make_grid The name of the parameter is a little weird, `nrow` would generally be explained as `number of rows`. But in this case it is exactly `number of columns`. Please consider changing the name in future releases, the current is really confusing. --- torchvision/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/torchvision/utils.py b/torchvision/utils.py index 2e8fbccb243..1b18ea90b55 100644 --- a/torchvision/utils.py +++ b/torchvision/utils.py @@ -8,8 +8,8 @@ def make_grid(tensor, nrow=8, padding=2, """ Given a 4D mini-batch Tensor of shape (B x C x H x W), or a list of images all of the same size, - makes a grid of images - + makes a grid of images of size (B / nrow, nrow). + normalize=True will shift the image to the range (0, 1), by subtracting the minimum and dividing by the maximum pixel value. From e7396624dbb3efad1366a04f863c26c75e469f60 Mon Sep 17 00:00:00 2001 From: Dmitry Ulyanov Date: Thu, 23 Mar 2017 23:41:22 +0300 Subject: [PATCH 2/3] Remove spaces --- torchvision/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchvision/utils.py b/torchvision/utils.py index 1b18ea90b55..2809804330c 100644 --- a/torchvision/utils.py +++ b/torchvision/utils.py @@ -9,7 +9,7 @@ def make_grid(tensor, nrow=8, padding=2, Given a 4D mini-batch Tensor of shape (B x C x H x W), or a list of images all of the same size, makes a grid of images of size (B / nrow, nrow). - + normalize=True will shift the image to the range (0, 1), by subtracting the minimum and dividing by the maximum pixel value. From 26dd5de0f7bda0abd7cb8e9a081206c3827144d8 Mon Sep 17 00:00:00 2001 From: Soumith Chintala Date: Thu, 23 Mar 2017 16:49:45 -0400 Subject: [PATCH 3/3] remove space --- torchvision/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchvision/utils.py b/torchvision/utils.py index 2809804330c..9d2fdd2f82c 100644 --- a/torchvision/utils.py +++ b/torchvision/utils.py @@ -8,7 +8,7 @@ def make_grid(tensor, nrow=8, padding=2, """ Given a 4D mini-batch Tensor of shape (B x C x H x W), or a list of images all of the same size, - makes a grid of images of size (B / nrow, nrow). + makes a grid of images of size (B / nrow, nrow). normalize=True will shift the image to the range (0, 1), by subtracting the minimum and dividing by the maximum pixel value.