[ 参数不⼀致 ] torch.swapdims¶
torch.swapdims¶
torch.swapdims(input,
dim0,
dim1)
参数映射¶
| PyTorch | PaddlePaddle | 备注 | | ————- | ———— | —————————————————— | | input | x | 输入 Tensor。 | | dim0 | - | Pytorch 转置的第一个维度,Paddle 无此参数,需要进行转写。 | | dim1 | - | Pytorch 转置的第二个维度,Paddle 无此参数,需要进行转写。 | | - | perm | Paddle 可通过 perm 参数,等价的实现 torch 的 dim0、dim1 的功能。|