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.38-40] #6446

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions docs/api/paddle/callbacks/Overview_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ paddle.callbacks 目录下包含飞桨框架支持的回调函数相关的 API
" :ref:`ProgBarLogger <cn_api_paddle_callbacks_ProgBarLogger>` ", "打印损失和评估指标日志回调类"
" :ref:`ReduceLROnPlateau <cn_api_paddle_callbacks_ReduceLROnPlateau>` ", "根据评估指标降低学习率回调函数"
" :ref:`VisualDL <cn_api_paddle_callbacks_VisualDL>` ", "可视化回调函数"
" :ref:`WandbCallback <cn_api_paddle_callbacks_WandbCallback>` ", "将为与'best'训练步骤关联的运行设置摘要指标"
32 changes: 32 additions & 0 deletions docs/api/paddle/callbacks/WandbCallback_cn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.. _cn_api_paddle_callbacks_WandbCallback:

WandbCallback
-------------------------------

.. py:class:: paddle.callbacks.WandbCallback(project=None, entity=None, name=None, dir=None, mode=None, job_type=None, **kwargs)

使用 `Weights and Biases <https://docs.wandb.ai>`_ 跟踪您的训练和系统指标。

**安装和设置**
使用 pip 安装并登录您的 W&B 账户:

.. code-block:: bash

pip install wandb
wandb login

参数
::::::::::::

- **project**(str, 可选) - 项目的名称。默认值为 uncategorized
- **entity**(str, 可选) - 创建运行的团队/用户的名称。默认值为已登录的用户
- **name**(str, 可选) - 运行的名称。默认值为 wandb 随机生成
- **dir**(str, 可选) - 存储所有元数据的目录。默认值为 `wandb`
- **mode**(str, 可选) - 可以是 "online"、"offline" 或 "disabled"。默认值为 "online".
- **job_type**(str, 可选) - 运行类型,用于将运行分组在一起。默认值为 None


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

COPY-FROM: paddle.callbacks.WandbCallback
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.. _cn_api_paddle_incubate_nn_functional_variable_length_memory_efficient_attention:

variable_length_memory_efficient_attention
-------------------------------

.. py:function:: paddle.incubate.nn.functional.variable_length_memory_efficient_attention(query, key, value, seq_lens, kv_seq_lens, mask=None, scale=None, causal=False, pre_cache_length=0)

Cutlass Memory Efficient Variable Attention。
这个方法需要 SM_ARCH 在 sm70, sm75, sm80 中。

参数
::::::::::::

- **query** (Tensor) - 查询张量。形状为 [batchsize, seq_len, num_head, head_size].
- **key** (Tensor) - 关键张量。形状为 [batchsize, seq_len, num_head, head_size].
- **value** (Tensor) - 值张量。形状为 [batchsize, seq_len, num_head, head_size].
- **seq_lens** (Tensor) - 批处理中序列的序列长度,用于索引查询。形状为 [batchsize, 1].
- **kv_seq_lens** (Tensor) - 批处理中序列的序列长度,用于索引键和值。形状为 [batchsize, 1].
- **mask** (Tensor) - 掩码张量。形状为 [batchsize, 1, query_seq_len, key_seq_len].
- **scale** (Float) - 注意力矩阵的刻度。默认值为 sqrt (1.0 / head_size).
- **causal** (Bool) - 是否使用因果掩码。默认值为 False.
- **pre_cache_length** (Int) - 预缓存的长度。默认值为 0.


返回
::::::::::::
Tensor: 输出张量。


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

COPY-FROM: paddle.callbacks.WandbCallback
2 changes: 1 addition & 1 deletion docs/api/paddle/profiler/SummaryView_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
SummaryView
---------------------

.. py:class:: paddle.profiler.SummaryView
.. py:class:: paddle.profiler.SummaryView(value)

SummaryView 枚举类用来表示数据表单的类型。

Expand Down