Thanks for reporting the issue. It seems the check might need to be updated, as an invalid size by 1 will fail in the sampling step currently instead of the check:
t = transforms.RandomCrop(size=101)
t.get_params(torch.randn(3, 100, 100), (50, 50)) # works
t.get_params(torch.randn(3, 100, 100), (100, 100)) # works
t.get_params(torch.randn(3, 100, 100), (101, 101)) # fails in the sampling step
# > RuntimeError: random_ expects 'from' to be less than 'to', but got from=0 >= to=0
t.get_params(torch.randn(3, 100, 100), (102, 102)) # fails in the check
# > ValueError: Required crop size (102, 102) is larger then input image size (100, 100)

Would you mind creating an issue in GitHub so that it can be tracked and fixed?