未验证 提交 34f07045 编写于 作者: L Ligoml 提交者: GitHub

update docs dtype(core.VarDesc.VarType)test=document_fix (#40947)

* update docs dtype(core.VarDesc.VarType)

* fix code style, test=document_fix

fix code style, test=document_fix
Co-authored-by: NChen Long <1300851984@qq.com>
上级 324b6b71
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
...@@ -11,20 +11,6 @@ ...@@ -11,20 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# Copyright(c) 2019 PaddlePaddle Authors.All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0(the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http: // www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
""" """
Contrib layers just related to the neural network. Contrib layers just related to the neural network.
""" """
...@@ -1050,7 +1036,7 @@ def sparse_embedding(input, ...@@ -1050,7 +1036,7 @@ def sparse_embedding(input,
vectors can be loaded with the :attr:`param_attr` parameter. The local word vector needs vectors can be loaded with the :attr:`param_attr` parameter. The local word vector needs
to be transformed into numpy format, and the shape of local word vector should be consistent to be transformed into numpy format, and the shape of local word vector should be consistent
with :attr:`size` . with :attr:`size` .
dtype(str|core.VarDesc.VarType): It refers to the data type of output Tensor. It must be float32 or dtype(str): It refers to the data type of output Tensor. It must be float32 or
float64. Default: float32. float64. Default: float32.
Returns: Returns:
......
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
...@@ -214,7 +214,7 @@ def embedding(input, ...@@ -214,7 +214,7 @@ def embedding(input,
user-defined or pre-trained word vectors can be loaded with the :attr:`param_attr` parameter. user-defined or pre-trained word vectors can be loaded with the :attr:`param_attr` parameter.
The local word vector needs to be transformed into numpy format, and the shape of local word The local word vector needs to be transformed into numpy format, and the shape of local word
vector should be consistent with :attr:`size` . vector should be consistent with :attr:`size` .
dtype(str|core.VarDesc.VarType): It refers to the data type of output Tensor. dtype(str): It refers to the data type of output Tensor.
It must be float32 or float64. Default: float32. It must be float32 or float64. Default: float32.
Returns: Returns:
......
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
...@@ -229,7 +229,7 @@ def cast(x, dtype): ...@@ -229,7 +229,7 @@ def cast(x, dtype):
Args: Args:
x(Tensor): An input N-D Tensor with data type bool, float16, x(Tensor): An input N-D Tensor with data type bool, float16,
float32, float64, int32, int64, uint8. float32, float64, int32, int64, uint8.
dtype(np.dtype|core.VarDesc.VarType|str): Data type of the output: dtype(np.dtype|str): Data type of the output:
bool, float16, float32, float64, int8, int32, int64, uint8. bool, float16, float32, float64, int8, int32, int64, uint8.
Returns: Returns:
......
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
...@@ -512,7 +512,7 @@ def arange(start=0, end=None, step=1, dtype=None, name=None): ...@@ -512,7 +512,7 @@ def arange(start=0, end=None, step=1, dtype=None, name=None):
it is the istance between two adjacent values, out[i+1] - out[i]. it is the istance between two adjacent values, out[i+1] - out[i].
If ``step`` is a Tensor, it is a 1-D Tensor with shape [1], with If ``step`` is a Tensor, it is a 1-D Tensor with shape [1], with
data type int32, int64, float32, float64. Default is 1. data type int32, int64, float32, float64. Default is 1.
dtype(str|np.dtype|core.VarDesc.VarType, optional): The data type of the dtype(str|np.dtype, optional): The data type of the
output tensor. Supported data types: int32, int64, float32, float64. output tensor. Supported data types: int32, int64, float32, float64.
If ``dytpe`` is None, the data type is float32. Default is None. If ``dytpe`` is None, the data type is float32. Default is None.
name(str, optional): The default value is None. Normally there is no name(str, optional): The default value is None. Normally there is no
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册