Skip to content
New issue

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

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

Already on GitHub? # to your account

[Docathon][BUPT][Add API Legend No.24]为slice_scatter添加图例 #70559

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
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
9 changes: 9 additions & 0 deletions python/paddle/tensor/manipulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7475,6 +7475,14 @@ def slice_scatter(
"""
Embeds the `value` tensor into `x` along multiple axes. Returns a new tensor instead of a view.
The size of `axes` must be equal to `starts` , `ends` and `strides`.

The image below demonstrates the case 2 — a tensor x with shape [3, 9], where a slice scatter operation is performed along axis 1, embedding a value tensor with shape [3, 1] into a specified range. The diagram shows the original tensor, the value tensor, and the resulting tensor after the operation.

.. image:: https://githubraw.cdn.bcebos.com/PaddlePaddle/docs/develop/docs/images/api_legend/slice_scatter.png
:width: 500
:alt: Illustration of Case 2
:align: center


Args:
x (Tensor) : The input Tensor. Supported data types are `bool`, `float16`, `float32`, `float64`, `uint8`, `int8`, `int16`, `int32`, `int64`, `bfloat16`, `complex64`, `complex128`.
Expand All @@ -7487,6 +7495,7 @@ def slice_scatter(

Returns:
Tensor, same dtype and shape with x


Examples:
.. code-block:: python
Expand Down
Loading