How can I swap values in pytorch tensor?

后端 未结 0 826
礼貌的吻别
礼貌的吻别 2021-01-14 20:59

I have the following tensor: vector = torch.tensor([[1,5,3], [2,3,4]])

How can I swap values on the second axis to have the following result:

相关标签:
回答
  • 消灭零回复
提交回复
热议问题