[ 参数不⼀致 ] torch.unflatten¶
torch.unflatten¶
torch.unflatten(input, dim, sizes)
参数映射¶
| PyTorch | PaddlePaddle | 备注 | | ————- | ———— | —————————————————— | | input | x | 输入 Tensor。 | | dim | - | Pytorch 需要变换的维度,Paddle 无此参数,需要进行转写。 Paddle 可修改 shape 实现。 | | sizes | - | Pytorch 维度变换的新形状,Paddle 无此参数,需要进行转写。Paddle 可修改 shape 实现。 | | - | shape | Paddle 可通过 shape 参数,等价的实现 torch 的 dim、sizes 的功能。|