diff --git a/docs/api/paddle/masked_fill_cn.rst b/docs/api/paddle/masked_fill_cn.rst index 36c7675fa4c..47351dfbe76 100644 --- a/docs/api/paddle/masked_fill_cn.rst +++ b/docs/api/paddle/masked_fill_cn.rst @@ -6,10 +6,9 @@ masked_fill .. py:function:: paddle.masked_fill(x, mask, value, name=None) - 返回一个 1-D 的 Tensor,Tensor 的值是根据 ``mask`` 信息,将 ``value`` 中的值填充到 ``x`` 中 ``mask`` 对应为 ``True`` 的位置,``mask`` 的数据类型是 bool。 -下图展示了一个例子:假设我们有一个所有元素值为 1 的 3x3 矩阵 `x` 和一个相同尺寸的掩码矩阵 `Mask`,`Value` 值为 3。 +下图展示了一个例子:假设我们有一个所有元素值为 1 的 3x3 矩阵 ``x`` 和一个相同尺寸的掩码矩阵 ``Mask``,``Value`` 值为 3。 .. image:: ../../images/api_legend/masked_fill.png :width: 700 @@ -18,7 +17,7 @@ masked_fill 参数 :::::::::::: - - **x** (Tensor) - 输入 Tensor,数据类型为 float,double,int,int64_t,float16 或者 bfloat16。 + - **x** (Tensor) - 输入 Tensor,数据类型为 float,double,int,int64_t,float16 或者 bfloat16。别名 ``input``。 - **mask** (Tensor) - 布尔张量,表示要填充的位置。mask 的数据类型必须为 bool。 - **value** (Scalar or 0-D Tensor):用于填充目标张量的值,数据类型为 float,double,int,int64_t,float16 或者 bfloat16。 - **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。 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 | 用于填充目标张量的值。 |