hey @vabh
Thanks for your reply, as testing matter, I did it in the getitem, but there is something weird
so here is my code
 class ImageFolder(data.Dataset):

    def __init__(self, root, transform=None, return_paths=False,
                 loader=default_loader):
        imgs = sorted(make_dataset(root))
        if len(imgs) == 0:
            raise(RuntimeError("Found 0 images in: " + root + "\n"
                               "Supported image extensions are: " +
                               ",".join(IMG_EXTENSIONS)))

        self.root = root
        self.imgs = imgs
        self.transform = transform
        self.return_paths = return_paths
        self.loader = loader

    def __getitem__(self, index):
        path = self.imgs[index]
        img = self.loader(path)
        if self.transform is not None:
            if "train" in self.root:
                print('image before crop: ', img.size)
                img = transforms.functional.crop(img, 360, 0, 720, 1280)
                print('image after crop: ', img.size)
            img = self.transform(img)
        if self.return_paths:
            return img, path
        else:
            return img

    def __len__(self):
        return len(self.imgs)

here is the output
image before crop: (1280, 720)
image after crop: (1280, 720)

So yes the image is cropped like I wanted (bottom half), but the size remained the same, and instead, the rest of the image is black
so my image looks like upper half black, bottom half what I want
Do you have any idea why is this ?