From e752ee26a53ddf2feda92de12e017ca3828a861d Mon Sep 17 00:00:00 2001 From: Guanhuachen2003 <166631022+Guanhuachen2003@users.noreply.github.com> Date: Tue, 6 Aug 2024 16:46:39 +0800 Subject: [PATCH 1/2] Add English captions to the concat API --- python/paddle/tensor/manipulation.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/python/paddle/tensor/manipulation.py b/python/paddle/tensor/manipulation.py index ca599f7ed909c..b6976e0f8c559 100644 --- a/python/paddle/tensor/manipulation.py +++ b/python/paddle/tensor/manipulation.py @@ -1310,6 +1310,15 @@ def concat( Concatenates the input along the axis. It doesn't support 0-D Tensor because it requires a certain axis, and 0-D Tensor doesn't have any axis. + The image illustrates a typical case of the concat operation. + Two three-dimensional tensors with shapes [2, 3, 4] are concatenated along different axes, resulting in tensors of different shapes. + The effects of concatenation along various dimensions are clearly visible. + + .. image:: https://githubraw.cdn.bcebos.com/PaddlePaddle/docs/develop/docs/images/api_legend/concat.png + :width: 800 + :alt: legend of view_as API + :align: center + Args: x (list|tuple): ``x`` is a Tensor list or Tensor tuple which is with data type bool, float16, bfloat16, float32, float64, int8, int16, int32, int64, uint8, uint16, complex64, complex128. All the Tensors in ``x`` must have same data type. From 2c5091ef1f1ad37fb9840f47aa3fd732467b4456 Mon Sep 17 00:00:00 2001 From: Guanhuachen2003 <166631022+Guanhuachen2003@users.noreply.github.com> Date: Tue, 6 Aug 2024 16:50:50 +0800 Subject: [PATCH 2/2] Add English legends to the concat API --- python/paddle/tensor/manipulation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/tensor/manipulation.py b/python/paddle/tensor/manipulation.py index b6976e0f8c559..7a224eec3e208 100644 --- a/python/paddle/tensor/manipulation.py +++ b/python/paddle/tensor/manipulation.py @@ -1315,8 +1315,8 @@ def concat( The effects of concatenation along various dimensions are clearly visible. .. image:: https://githubraw.cdn.bcebos.com/PaddlePaddle/docs/develop/docs/images/api_legend/concat.png - :width: 800 - :alt: legend of view_as API + :width: 500 + :alt: legend of concat API :align: center Args: