How to implement random cropping during training?
For segmentation, random cropping cannot be included inside the model definition, since random crop of same state also has to applied on mask. I suggest before each epoch, apply the 'random_crop' function on the entire dataset and shuffle(very important) the dataset.