This might work
import torch
from torchvision import transforms
transform = transforms.Compose([
  transforms.Resize((30,30)),
])
x = torch.ones(10, 10, 6, 6)
y = transform(x)
print(y.shape)

Output -
torch.Size([10, 10, 30, 30])