I have a (N, 9, 9) shape tensorflow tensor T, and permutations Px, Py which might look like this: [3 4 5 6 7 8 2 1 0], [6 8 2 0 3 7 4 1 5].
[3 4 5 6 7 8 2 1 0]
[6 8 2 0 3 7 4 1 5]