未验证 提交 757e3618 编写于 作者: L Li Fuchen 提交者: GitHub

Merge pull request #449 from lfchener/develop

update grad_clip to 1.8
...@@ -27,7 +27,7 @@ To avoid the trouble of environment setup, [running in Docker container](#runnin ...@@ -27,7 +27,7 @@ To avoid the trouble of environment setup, [running in Docker container](#runnin
### Prerequisites ### Prerequisites
- Python 2.7 only supported - Python 2.7 only supported
- PaddlePaddle 1.6.0 or later (please refer to the [Installation Guide](https://www.paddlepaddle.org.cn/documentation/docs/en/beginners_guide/index_en.html)) - PaddlePaddle 1.8.0 or later (please refer to the [Installation Guide](https://www.paddlepaddle.org.cn/documentation/docs/en/beginners_guide/index_en.html))
### Setup ### Setup
- Make sure these libraries or tools installed: `pkg-config`, `flac`, `ogg`, `vorbis`, `boost` and `swig`, e.g. installing them via `apt-get`: - Make sure these libraries or tools installed: `pkg-config`, `flac`, `ogg`, `vorbis`, `boost` and `swig`, e.g. installing them via `apt-get`:
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
### 前提 ### 前提
- 只支持Python 2.7 - 只支持Python 2.7
- PaddlePaddle 1.6.0 版本及以上(请参考[安装指南](https://www.paddlepaddle.org.cn/install/quick) - PaddlePaddle 1.8.0 版本及以上(请参考[安装指南](https://www.paddlepaddle.org.cn/install/quick)
### 安装 ### 安装
- 请确保以下库或工具已安装完毕:`pkg-config`, `flac`, `ogg`, `vorbis`, `boost``swig`, 如可以通过`apt-get`安装: - 请确保以下库或工具已安装完毕:`pkg-config`, `flac`, `ogg`, `vorbis`, `boost``swig`, 如可以通过`apt-get`安装:
......
...@@ -285,9 +285,8 @@ class DeepSpeech2Model(object): ...@@ -285,9 +285,8 @@ class DeepSpeech2Model(object):
learning_rate=learning_rate, learning_rate=learning_rate,
decay_steps=num_samples / batch_size / dev_count, decay_steps=num_samples / batch_size / dev_count,
decay_rate=0.83, decay_rate=0.83,
staircase=True)) staircase=True),
fluid.clip.set_gradient_clip( grad_clip=fluid.clip.GradientClipByGlobalNorm(
clip=fluid.clip.GradientClipByGlobalNorm(
clip_norm=gradient_clipping)) clip_norm=gradient_clipping))
optimizer.minimize(loss=ctc_loss) optimizer.minimize(loss=ctc_loss)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册