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
2b3a1b6d
Commit
2b3a1b6d
authored
May 27, 2019
by
Tongzhou Wang
Committed by
Soumith Chintala
May 27, 2019
Browse files
Improve make_grid docs (#964)
parent
d4a126b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
torchvision/utils.py
torchvision/utils.py
+6
-6
No files found.
torchvision/utils.py
View file @
2b3a1b6d
...
@@ -11,16 +11,16 @@ def make_grid(tensor, nrow=8, padding=2,
...
@@ -11,16 +11,16 @@ def make_grid(tensor, nrow=8, padding=2,
tensor (Tensor or list): 4D mini-batch Tensor of shape (B x C x H x W)
tensor (Tensor or list): 4D mini-batch Tensor of shape (B x C x H x W)
or a list of images all of the same size.
or a list of images all of the same size.
nrow (int, optional): Number of images displayed in each row of the grid.
nrow (int, optional): Number of images displayed in each row of the grid.
The
F
inal grid size is (B / nrow, nrow). Default
is 8
.
The
f
inal grid size is
``
(B / nrow, nrow)
``
. Default
: ``8``
.
padding (int, optional): amount of padding. Default
is 2
.
padding (int, optional): amount of padding. Default
: ``2``
.
normalize (bool, optional): If True, shift the image to the range (0, 1),
normalize (bool, optional): If True, shift the image to the range (0, 1),
by
subtracting
the min
imum
and
dividing by the maximum pixel value
.
by the min and
max values specified by :attr:`range`. Default: ``False``
.
range (tuple, optional): tuple (min, max) where min and max are numbers,
range (tuple, optional): tuple (min, max) where min and max are numbers,
then these numbers are used to normalize the image. By default, min and max
then these numbers are used to normalize the image. By default, min and max
are computed from the tensor.
are computed from the tensor.
scale_each (bool, optional): If True, scale each image in the batch of
scale_each (bool, optional): If
``
True
``
, scale each image in the batch of
images separately rather than the (min, max) over all images.
images separately rather than the (min, max) over all images.
Default: ``False``.
pad_value (float, optional): Value for the padded pixels.
pad_value (float, optional): Value for the padded pixels.
Default: ``0``.
Example:
Example:
See this notebook `here <https://gist.github.com/anonymous/bf16430f7750c023141c562f3e9f2a91>`_
See this notebook `here <https://gist.github.com/anonymous/bf16430f7750c023141c562f3e9f2a91>`_
...
...
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