How Can I Swap Axis In A Torch Tensor?
I have a torch tensor of size torch.Size([1, 128, 56, 128]) 1 is channel, 128 is the width, and height. 56 are the stacks of images. How can I resize it to torch.Size([1, 56, 128,
Solution 1:
You could simply use permute
or transpose
.
Post a Comment for "How Can I Swap Axis In A Torch Tensor?"