diff --git a/docs/api/paddle/masked_fill_cn.rst b/docs/api/paddle/masked_fill_cn.rst index 36c7675fa4c..af2ddf16496 100644 --- a/docs/api/paddle/masked_fill_cn.rst +++ b/docs/api/paddle/masked_fill_cn.rst @@ -5,7 +5,8 @@ masked_fill .. py:function:: paddle.masked_fill(x, mask, value, name=None) - +.. note:: + 该 API 同时支持 ``input`` 作为 ``x`` 的别名关键字参数,与 PyTorch 用法兼容。 返回一个 1-D 的 Tensor,Tensor 的值是根据 ``mask`` 信息,将 ``value`` 中的值填充到 ``x`` 中 ``mask`` 对应为 ``True`` 的位置,``mask`` 的数据类型是 bool。 diff --git a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.masked_fill.md b/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.masked_fill.md deleted file mode 100644 index a10257123c3..00000000000 --- a/docs/guides/model_convert/convert_from_pytorch/api_difference/args_name_diff/torch.masked_fill.md +++ /dev/null @@ -1,20 +0,0 @@ -## [ 仅参数名不一致 ]torch.masked_fill -### [torch.masked_fill](https://pytorch.org/docs/stable/generated/torch.Tensor.masked_fill.html#torch.Tensor.masked_fill) -```python -torch.masked_fill(input, mask, value) -``` - -### [paddle.masked\_fill](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/masked_fill_cn.html#paddle.masked_fill) -```python -paddle.masked_fill(x, mask, value, name=None) -``` - -两者功能一致,参数完全一致,具体如下: - -### 参数映射 - -| PyTorch | PaddlePaddle | 备注 | -| ------- | ------------ | ------------------------------- | -| input | x | 输入的 Tensor,仅参数名不一致。 | -| mask | mask | 布尔张量,表示要填充的位置。 | -| value | value | 用于填充目标张量的值。 |