Maybe I use too many tf.gather function in my augmentation function, causing the whole performance to be seriously reduced. The loop reduction in the random_resizez method tf.gather helps to speed up the training, but this is only valid for tf.data, and is constructed in the layer’s way too slow.
Are there any faster alternatives to tf.gather?