Let's say that I have input with size $n\times n$ and after that I operated shuffled operations and get the output with the same dimension. But I don't know if we can do that or not. The idea is to permute all the configuration and find the minimum configuration when given loss. But the operation became very expensive with the growth of $O((n^2)!)$, and with each iteration we need to compute loss separately. So is there an optimization for such problem or it just not feasible?
In other words, is there a gradient correlation between different configuration that will lead to the local minima of the loss function?