resize
- hybrid_learning.datasets.transforms.image_transforms.resize(tens, size, mode='bilinear')[source]
Resize the given tensor assuming it to be a 2D image or batch thereof. This is a wrapper around
torch.nn.functional.interpolate()
which takes care of automatic unsqueezing and squeezing of batch and channel dimensions assuming 2D images.- Parameters
- Returns
tensor representing resized 2D image (batch)
- Return type