How to resize and pad in a torchvision.transforms.Compose()? vision
  
  
    F.pad function requires input as torch tensor but it is given PIL Image here. It throws error on me.
  


Use
import torchvision.transforms.functional as F
instead of
import torch.nn.functional as F