[ 仅参数名不一致 ]torch.nn.functional.layer_norm¶
torch.nn.functional.layer_norm¶
torch.nn.functional.layer_norm(input, normalized_shape, weight=None, bias=None, eps=1e-05)
paddle.nn.functional.layer_norm¶
paddle.nn.functional.layer_norm(x, normalized_shape, weight=None, bias=None, epsilon=1e-05, name=None)
两者功能相同,仅参数名不一致,具体如下:
参数映射¶
PyTorch | PaddlePaddle | 备注 |
---|---|---|
input | x | 表示输入的 Tensor ,仅参数名不一致。 |
normalized_shape | normalized_shape | 需规范化的 shape |
weight | weight | 权重的 Tensor |
bias | bias | 偏置的 Tensor |
eps | epsilon | 为了数值稳定加在分母上的值 |