Loading [Contrib]/a11y/accessibility-menu.js
\u200E
文档[torch 参数更多]torch.special.round Edit on Github
[torch 参数更多]torch.special.round
torch.special.round(input, *, decimals=0, out=None)
paddle.round(x, name=None)
PyTorch 相比 Paddle 支持更多其他参数,具体如下:
参数映射
PyTorch |
PaddlePaddle |
备注 |
input |
x |
输入的 Tensor,仅参数名不一致。 |
decimals |
- |
舍入到的小数位数,PaddlePaddle 无此参数,需要转写。 |
out |
- |
表示输出的 Tensor,Paddle 无此参数,需要转写。 |
转写示例
decimals:要舍入到的小数位数
torch.special.round(x, decimals=2)
paddle.round(1e2 * x) / 1e2
out 参数:输出的 Tensor
torch.special.round(x, out=y)
paddle.assign(paddle.round(x), y)
文档反馈