Skip to content

修复 paddle.argmax 等 API 的文档 #56926

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions python/paddle/device/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@ def set_device(device):
It can be ``cpu``, ``gpu``, ``xpu``, ``npu``, ``gpu:x``, ``xpu:x``, ``npu:x`` and ``ipu``,
where ``x`` is the index of the GPUs, XPUs or NPUs.

Returns:
Place,the Place to set.

Examples:

.. code-block:: python
Expand Down
2 changes: 1 addition & 1 deletion python/paddle/hapi/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ def on_eval_end(self, logs=None):

class VisualDL(Callback):
"""
VisualDL callback function.
VisualDL is a VisualDL (fly oar visual analysis tools) callback class. After storing the loss values and evaluation metrics during the training process in a log file, the panel is launched to view the visual results.

Args:
log_dir (str): The directory to save visualdl log file.
Expand Down
3 changes: 3 additions & 0 deletions python/paddle/nn/layer/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,9 @@ def extend(self, sublayers):
Parameters:
sublayers (iterable of Layer): iterable of sublayers to append

Returns:
None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Returns:
None
Returns:
None

话说这是改的哪个api?


Examples:
.. code-block:: python

Expand Down
2 changes: 1 addition & 1 deletion python/paddle/nn/layer/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,7 @@ def generate_square_subsequent_mask(self, length):
length (int|Tensor): The length of sequence.

Returns:
Tensor: Generated square mask according to the given length.
Tensor, generated according to the size of the input the length of the specific shape for [length, length] of the square to mask.

Examples:
.. code-block:: python
Expand Down
5 changes: 3 additions & 2 deletions python/paddle/tensor/creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,11 @@ def create_parameter(

Args:
shape (list of int): Shape of the parameter
dtype (str): Data type of the parameter
dtype (str|numpy.dtype): Initialize the data type. The string values that can be set "float16", "float32", "float64".
name (str, optional): For detailed information, please refer to
:ref:`api_guide_Name` . Usually name is no need to set and None by default.
attr (ParamAttr, optional): Attributes of the parameter
attr (ParamAttr, optional): Attribute object of the specified argument. For detailed information, please refer to
:ref:`en_api_fluid_ParamAttr` None by default, which means that ParamAttr will be initialized as it is.
is_bias (bool, optional): This can affect which default initializer is chosen
when default_initializer is None. If is_bias,
initializer.Constant(0.0) will be used. Otherwise,
Expand Down