Target Transforms for keypoints in Image

If my training image is (3,128,96), but my target is just a coordinate (x,y), can I apply transform=transforms.Compose ([ transforms.ColorJitter(), transforms.ToTensor()] on both the label(target) and training image? I can see it gives me some sort of error when I use ColorJitter. One of the errors is TypeError: brightness should be a single number or a list/tuple with lenght 2

This won’t work, since you are trying to apply image transformations on coordinates.
Neither ColorJitter not ToTensor should be used on your target.

If you are using RandomCrop, you have to crop the target coordinates in the same way of course.
The easiest way would probably be to use the fuctional API of torchvision.transforms.