Random transformation are different across calls?

I want to rotate all the images in my data_set with a random degree between [0,180]. If I compose a transformation function and pass my images to this function in getitem function of my data_set class, does this mean, 1) every single image is randomly rotated?, 2) images in each batch get rotated with an identical degree but this degree randomly changes across batches (calls)?

I would appreciate if you could clarify this for me.

Generally if you are using the torchvision transforms inferface, each image is randomly transformed, meaning within a batch the rotations will be different. If you want control over this, you can craft your own data preprocessing function using the functional transfom: torchvision.transforms — Torchvision 0.8.1 documentation (pytorch.org)