Thanks! I understand what unfold does.
But for a, I think we need to use transpose(-1, -2) instead of reshape(10, -1, 30). Am I right? It seems that the last reshape for result also doesn’t give a right answer.