Nanthak_R:

Does transpose cause any problem in gradient flow?


No, transpose will not detach the output from the computation graph or create any other issues, and would recommend to check the “logic” of the operation in your model.
I.e. what do the dimensions on the tensor represent without the transpose operation and how would the successive layers use this information.