Skip to content

Conversation

Liyulingyue
Copy link
Contributor

issue list:

  1. 修正了paddle.t中文文档的格式问题
  2. 修正了5篇文档中的输出示例展示

该OP对小于等于2维的Tensor进行数据转置。0维和1维Tensor返回本身,2维Tensor等价于perm设置为0,1的 :ref:`cn_api_fluid_layers_transpose` 函数。

参数:
参数
::::::::
- **input** (Tensor) - 输入:N维(N<=2)Tensor,可选的数据类型为float16, float32, float64, int32, int64。
- **name** (str, 可选)- 该参数供开发人员打印调试信息时使用,具体用法请参见 :ref:`api_guide_Name` ,默认值为None
Copy link
Collaborator

Choose a reason for hiding this comment

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

注意标点符号:
float16、float32、float64、int32、int64。
默认值为None。


**代码示例**:
示例代码2
::::::::

.. code-block:: python
Copy link
Collaborator

Choose a reason for hiding this comment

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

这两段示例代码合成一个吧,第一段是伪代码,建议修改,中英文的代码都需要修改,中文修改为引用英文代码

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

@Liyulingyue
Copy link
Contributor Author

Liyulingyue commented Mar 29, 2022

英文见 PaddlePaddle/Paddle#40984
@Ligoml

# [[0.79000002, 0.63999999],
# [0.83999997, 0.14000000],
# [0.31999999, 0.56999999]]
paddle.t(x).shape # [3, 2]
Copy link
Collaborator

Choose a reason for hiding this comment

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

代码使用copy-from的方式,文档参考

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Ligoml 已修改

Copy link
Collaborator

@Ligoml Ligoml left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants