Skip to content
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

[Docathon][Add CN Doc No.3] Add fused_linear #6479

Merged
merged 2 commits into from
Jan 18, 2024
Merged
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
26 changes: 26 additions & 0 deletions docs/api/paddle/incubate/nn/functional/fused_linear_cn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.. _cn_api_paddle_incubate_nn_functional_fused_linear:

fused_linear
-------------------------------

.. py:function:: paddle.incubate.nn.functional.fused_linear(x, weight, bias=None, trans_x=False, transpose_weight=False, name=None)
全连接线性变换算子。该方法要求 CUDA 版本大于等于 11.6 。

参数
:::::::::

- **x** (Tensor) – 需要进行乘法运算的输入 Tensor。
- **weight** (Tensor) – 需要进行乘法运算的权重 Tensor,它的阶数必须为 2。
- **bias** (Tensor, 可选) – 输入的偏置 Tensor。如果为 None ,则不执行偏置加法。否则,将偏置加到矩阵乘法的结果上。默认值为 None。
- **transpose_weight** (bool, 可选) - 是否在乘法之前转置权重。默认值:False。
- **name** (str, 可选) - 如需详细信息,请参阅 :ref:`api_guide_Name` 。一般无需设置,默认值为 None。

返回
:::::::::

**Tensor**,变换之后的 Tensor。

代码示例
::::::::::::

COPY-FROM: paddle.incubate.nn.functional.fused_linear