Hello,
I’m trying to apply torchvision.transforms.RandAugment to some images, however it seems to be inconsistent in its results (I know the transforms will be random so it’s a different type of inconsistency).
The documentation on RandAugment says the input should be of torch.uint8.
However, I’ve found it to both work with and error with inputs of torch.float32.
My current transforms pipeline looks like this:
train_transforms = transforms.Compose([
    transforms.Resize((64, 64)),
    transforms.ToTensor(), # it seems the order in where this is placed effects whether the transform works or not
    transforms.RandAugment()
])

Using the above seems to generate inconsistent results.
But if I change the order:
train_transforms = transforms.Compose([
    transforms.Resize((64, 64)),
    transforms.RandAugment(),
    transforms.ToTensor()
])

It seems to work without fail.
So my questions are:

Is there a best practice on the order of transforms?
Or do I need to not worry about transforms.ToTensor since transforms.RandAugment returns a torch.Tensor?

Example code notebook here: https://colab.research.google.com/drive/1edkqgfDxry8BNvwdf9wGF7KUbvaEMnQm?usp=sharing