In tf 2.5, there are two functions for cropping an image: tf.image.stateless_random_crop, and tf.image.random_crop. The documentation states that stateless_random_crop is deterministic (always returns the same crop given one seed). However, random_crop has a seed parameter and is also deterministic, one would think. What is the actual difference between these two functions? I cannot find information about statelessness in Tensorflow anywhere.
The differences between tf.image.stateless_random_crop, and tf.image.random_crop are one line where stateless_random_uniform is used instead of a random_uniform:
stateless_random_crop: https://github.com/tensorflow/tensorflow/blob/v2.5.0/tensorflow/python/ops/random_ops.py#L415-L465
random_crop: https://github.com/tensorflow/tensorflow/blob/v2.5.0/tensorflow/python/ops/random_ops.py#L360-L412
I always thought that random_crop would always return the same crop given a seed, but it looks like maybe that wasn't always true? Any enlightenment about statelessness in Tensorflow is greatly appreciated!