update grad_clip to 1.8

pull/449/head
lfchener 4 years ago
parent 766e96e600
commit 01019fb92b

@ -27,7 +27,7 @@ To avoid the trouble of environment setup, [running in Docker container](#runnin
### Prerequisites
- 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
- 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 @@
### 前提
- 只支持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`安装:

@ -285,9 +285,8 @@ class DeepSpeech2Model(object):
learning_rate=learning_rate,
decay_steps=num_samples / batch_size / dev_count,
decay_rate=0.83,
staircase=True))
fluid.clip.set_gradient_clip(
clip=fluid.clip.GradientClipByGlobalNorm(
staircase=True),
grad_clip=fluid.clip.GradientClipByGlobalNorm(
clip_norm=gradient_clipping))
optimizer.minimize(loss=ctc_loss)

Loading…
Cancel
Save