peal.visualization.image_grid.zip_tensors

peal.visualization.image_grid.zip_tensors(tensor_list)[source]

Interleave several image batches sample by sample along the width.

Parameters:

tensor_list (list of torch.Tensor) – Batches of shape [N, 3, H, W_j] with a common N and H.

Returns:

[N, 3, H, sum(W_j) + 5 * (len(tensor_list) - 1)]: sample i of every batch placed side by side, separated by 5-pixel white bars.

Return type:

torch.Tensor