vision_make_grid {torchvision} | R Documentation |
A simplified version of torchvision.utils.make_grid
Description
Arranges a batch B of (image) tensors in a grid, with optional padding between images. Expects a 4d mini-batch tensor of shape (B x C x H x W).
Usage
vision_make_grid(
tensor,
scale = TRUE,
num_rows = 8,
padding = 2,
pad_value = 0
)
Arguments
tensor |
tensor of shape (B x C x H x W) to arrange in grid. |
scale |
whether to normalize (min-max-scale) the input tensor. |
num_rows |
number of rows making up the grid (default 8). |
padding |
amount of padding between batch images (default 2). |
pad_value |
pixel value to use for padding. |
Value
a 3d torch_tensor of shape \approx(C , num\_rows \times H , num\_cols \times W)
of all images arranged in a grid.
See Also
Other image display:
draw_bounding_boxes()
,
draw_keypoints()
,
draw_segmentation_masks()
,
tensor_image_browse()
,
tensor_image_display()
[Package torchvision version 0.7.0 Index]