How to random crop a image tuple

I would recommend to use the functional API.
Here is an example.