The shapes shouldn’t be the same, if you index the tensor (the second one should be torch.Size([256]) or the first one should have an additional dim0).
Anyway, you cannot permute three axes, if your tensor just has two dimensions.
What is your use case? Are you maybe missing the batch dimension?