Solved by charan_Vjy in post #5 
              
              
                I’m using 1.4.0. However, I don’t think that is the problem. This feature has been available for as long as I can remember. Going through your question, your tensor is of shape [1,31,5]. I would suggest changing its shape to [1,5,31] before you go ahead. You can do that with x = x.permute(0,2,1) bef…