Skip to content

Commit

Permalink
Fix text hooks regression and use dochooks v0.5.0 (PaddlePaddle#6909)
Browse files Browse the repository at this point in the history
  • Loading branch information
SigureMo authored Oct 14, 2024
1 parent b5f4c0d commit d7e515a
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:
types: [text]
# Document hooks
- repo: https://github.com/PFCCLab/dochooks
rev: v0.4.0
rev: v0.5.0
hooks:
- id: insert-whitespace-between-cn-and-en-char
files: \.md$|\.rst$
Expand Down
4 changes: 2 additions & 2 deletions docs/api/paddle/optimizer/ASGD_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ ASGD
-------------------------------

.. py:class:: paddle.optimizer.ASGD(learning_rate=0.001, batch_num=1, parameters=None, weight_decay=None, grad_clip=None, multi_precision=False, name=None)
ASGD算法的优化器。有关详细信息,请参阅:
ASGD 算法的优化器。有关详细信息,请参阅:

`Minimizing Finite Sums with the Stochastic Average Gradient <https://hal.science/hal-00860051v2>`_ 。

Expand Down
4 changes: 2 additions & 2 deletions docs/api/paddle/optimizer/Rprop_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ Rprop

.. py:class:: paddle.optimizer.Rprop(learning_rate=0.001, learning_rate_range=(1e-5, 50), parameters=None, etas=(0.5, 1.2), grad_clip=None, name=None)
.. note::
此优化器仅适用于 full-batch 训练。

Rprop算法的优化器。有关详细信息,请参阅:
Rprop 算法的优化器。有关详细信息,请参阅:

`A direct adaptive method for faster backpropagation learning : The RPROP algorithm <https://ieeexplore.ieee.org/document/298623>`_ 。

Expand Down
1 change: 0 additions & 1 deletion docs/api/paddle/utils/try_import_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ try_import
返回
:::::::::
如果成功导入,返回对应模块的对象;如果失败,则抛出 ImportError。

2 changes: 1 addition & 1 deletion docs/api_guides/low_level/optimizer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ API Reference 请参考 :ref:`cn_api_fluid_optimizer_Rprop`

:code:`ASGD` 优化器,是 `SGD` 以空间换时间的策略版本,是一种轨迹平均的随机优化方法。 `ASGD` 在 `SGD` 的基础上,增加了历史参数的平均值度量,让下降方向噪音的方差呈递减趋势下降,从而使得算法最终会以线性速度收敛于最优值。

API Reference 请参考 :ref:`cn_api_fluid_optimizer_ASGD`
API Reference 请参考 :ref:`cn_api_fluid_optimizer_ASGD`
2 changes: 1 addition & 1 deletion docs/api_guides/low_level/optimizer_en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ API Reference: :ref:`api_fluid_optimizer_Rprop`

:code:`ASGD` Optimizer, it is a strategy version of SGD that trades space for time, and is a stochastic optimization method with trajectory averaging. On the basis of SGD, ASGD adds a measure of the average value of historical parameters, making the variance of noise in the descending direction decrease in a decreasing trend, so that the algorithm will eventually converge to the optimal value at a linear speed.

API Reference: :ref:`api_fluid_optimizer_ASGD`
API Reference: :ref:`api_fluid_optimizer_ASGD`
4 changes: 2 additions & 2 deletions docs/guides/10_contribution/hackathon_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ RFC 通过并合入后形成 Tracking Issue。原则上完成 RFC 的开发者
> [!NOTE]
>
> 1. 优秀 RFC 案例:
> - [将 xdoctest 引入到飞桨框架工作流中](https://github.com/PaddlePaddle/community/blob/master/rfcs/Docs/将%20xdoctest%20引入到飞桨框架工作流中.md)
> - [为 Paddle 框架 API 添加类型提示](https://github.com/PaddlePaddle/community/blob/master/rfcs/CodeStyle/【Hackathon%206th】为%20Paddle%20框架%20API%20添加类型提示.md)
> - [将 xdoctest 引入到飞桨框架工作流中](https://github.com/PaddlePaddle/community/blob/master/rfcs/Docs/将%20xdoctest%20引入到飞桨框架工作流中.md) <!-- dochooks: skip-line -->
> - [为 Paddle 框架 API 添加类型提示](https://github.com/PaddlePaddle/community/blob/master/rfcs/CodeStyle/【Hackathon%206th】为%20Paddle%20框架%20API%20添加类型提示.md) <!-- dochooks: skip-line -->
> 2. 优秀 Tracking Issue 案例:
> - [将 xdoctest 引入到飞桨框架工作流中 Tracking Issue](https://github.com/PaddlePaddle/Paddle/issues/54705)
> - [为公开 API 标注类型提示信息 Tracking Issue](https://github.com/PaddlePaddle/Paddle/issues/65008)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

```python
torch.optim.ASGD(params,
lr=0.01,
lambd=0.0001,
alpha=0.75,
t0=1000000.0,
weight_decay=0,
foreach=None,
maximize=False,
lr=0.01,
lambd=0.0001,
alpha=0.75,
t0=1000000.0,
weight_decay=0,
foreach=None,
maximize=False,
differentiable=False)
```

Expand Down

0 comments on commit d7e515a

Please sign in to comment.