Got it, thanks so much @ariG23498 and @Bhack ! Also surprisingly enough (I haven’t checked the source code for Permute layer yet and I will get to doing that) while my experiments I noticed the exact same operation with tf.keras.layers.Permute is faster than tf.einsum.