Repository: PaddlePaddle/models

Issue:
Invalid url in `librispeech/download_model.sh`
The url in `librispeech/download_model.sh` is not available now.


Discussion:

Resolving patch:
diff --git a/deep_speech_2/infer.py b/deep_speech_2/infer.py
--- a/deep_speech_2/infer.py
+++ b/deep_speech_2/infer.py
@@ -17,7 +17,7 @@
 add_arg('num_samples',      int,    10,     "# of samples to infer.")
 add_arg('trainer_count',    int,    8,      "# of Trainers (CPUs or GPUs).")
 add_arg('beam_size',        int,    500,    "Beam search width.")
-add_arg('num_proc_bsearch', int,    12,     "# of CPUs for beam search.")
+add_arg('num_proc_bsearch', int,    8,      "# of CPUs for beam search.")
 add_arg('num_conv_layers',  int,    2,      "# of convolution layers.")
 add_arg('num_rnn_layers',   int,    3,      "# of recurrent layers.")
 add_arg('rnn_layer_size',   int,    2048,   "# of recurrent cells per layer.")
diff --git a/deep_speech_2/tools/tune.py b/deep_speech_2/tools/tune.py
--- a/deep_speech_2/tools/tune.py
+++ b/deep_speech_2/tools/tune.py
@@ -27,7 +27,8 @@
 add_arg('batch_size',       int,    256,    "# of samples per batch.")
 add_arg('trainer_count',    int,    8,      "# of Trainers (CPUs or GPUs).")
 add_arg('beam_size',        int,    500,    "Beam search width.")
-add_arg('num_proc_bsearch', int,    12,     "# of CPUs for beam search.")
+add_arg('num_proc_bsearch', int,    8,     "# of CPUs for beam search.")
+add_arg('num_proc_data',    int,    8,      "# of CPUs for data preprocessing.")
 add_arg('num_conv_layers',  int,    2,      "# of convolution layers.")
 add_arg('num_rnn_layers',   int,    3,      "# of recurrent layers.")
 add_arg('rnn_layer_size',   int,    2048,   "# of recurrent cells per layer.")
@@ -86,7 +87,7 @@ def tune():
         mean_std_filepath=args.mean_std_path,
         augmentation_config='{}',
         specgram_type=args.specgram_type,
-        num_threads=1)
+        num_threads=args.num_proc_data)
 
     audio_data = paddle.layer.data(
         name="audio_spectrogram",
diff --git a/deep_speech_2/train.py b/deep_speech_2/train.py
--- a/deep_speech_2/train.py
+++ b/deep_speech_2/train.py
@@ -16,7 +16,7 @@
 add_arg('batch_size',       int,    256,    "Minibatch size.")
 add_arg('trainer_count',    int,    8,      "# of Trainers (CPUs or GPUs).")
 add_arg('num_passes',       int,    200,    "# of training epochs.")
-add_arg('num_proc_data',    int,    8,      "# of CPUs for data preprocessing.")
+add_arg('num_proc_data',    int,    16,     "# of CPUs for data preprocessing.")
 add_arg('num_conv_layers',  int,    2,      "# of convolution layers.")
 add_arg('num_rnn_layers',   int,    3,      "# of recurrent layers.")
 add_arg('rnn_layer_size',   int,    2048,   "# of recurrent cells per layer.")


Test patch:
diff --git a/deep_speech_2/examples/aishell/run_test.sh b/deep_speech_2/examples/aishell/run_test.sh
--- a/deep_speech_2/examples/aishell/run_test.sh
+++ b/deep_speech_2/examples/aishell/run_test.sh
@@ -18,7 +18,7 @@ python -u test.py \
 --trainer_count=8 \
 --beam_size=300 \
 --num_proc_bsearch=8 \
---num_proc_data=4 \
+--num_proc_data=8 \
 --num_conv_layers=2 \
 --num_rnn_layers=3 \
 --rnn_layer_size=1024 \
diff --git a/deep_speech_2/examples/aishell/run_test_golden.sh b/deep_speech_2/examples/aishell/run_test_golden.sh
--- a/deep_speech_2/examples/aishell/run_test_golden.sh
+++ b/deep_speech_2/examples/aishell/run_test_golden.sh
@@ -27,7 +27,7 @@ python -u test.py \
 --trainer_count=8 \
 --beam_size=300 \
 --num_proc_bsearch=8 \
---num_proc_data=4 \
+--num_proc_data=8 \
 --num_conv_layers=2 \
 --num_rnn_layers=3 \
 --rnn_layer_size=1024 \
diff --git a/deep_speech_2/examples/librispeech/run_test.sh b/deep_speech_2/examples/librispeech/run_test.sh
--- a/deep_speech_2/examples/librispeech/run_test.sh
+++ b/deep_speech_2/examples/librispeech/run_test.sh
@@ -18,7 +18,7 @@ python -u test.py \
 --trainer_count=8 \
 --beam_size=500 \
 --num_proc_bsearch=8 \
---num_proc_data=4 \
+--num_proc_data=8 \
 --num_conv_layers=2 \
 --num_rnn_layers=3 \
 --rnn_layer_size=2048 \
diff --git a/deep_speech_2/examples/librispeech/run_test_golden.sh b/deep_speech_2/examples/librispeech/run_test_golden.sh
--- a/deep_speech_2/examples/librispeech/run_test_golden.sh
+++ b/deep_speech_2/examples/librispeech/run_test_golden.sh
@@ -27,7 +27,7 @@ python -u test.py \
 --trainer_count=8 \
 --beam_size=500 \
 --num_proc_bsearch=8 \
---num_proc_data=4 \
+--num_proc_data=8 \
 --num_conv_layers=2 \
 --num_rnn_layers=3 \
 --rnn_layer_size=2048 \
diff --git a/deep_speech_2/examples/tiny/run_test.sh b/deep_speech_2/examples/tiny/run_test.sh
--- a/deep_speech_2/examples/tiny/run_test.sh
+++ b/deep_speech_2/examples/tiny/run_test.sh
@@ -18,7 +18,7 @@ python -u test.py \
 --trainer_count=8 \
 --beam_size=500 \
 --num_proc_bsearch=8 \
---num_proc_data=4 \
+--num_proc_data=8 \
 --num_conv_layers=2 \
 --num_rnn_layers=3 \
 --rnn_layer_size=2048 \
diff --git a/deep_speech_2/examples/tiny/run_test_golden.sh b/deep_speech_2/examples/tiny/run_test_golden.sh
--- a/deep_speech_2/examples/tiny/run_test_golden.sh
+++ b/deep_speech_2/examples/tiny/run_test_golden.sh
@@ -27,7 +27,7 @@ python -u test.py \
 --trainer_count=8 \
 --beam_size=500 \
 --num_proc_bsearch=8 \
---num_proc_data=4 \
+--num_proc_data=8 \
 --num_conv_layers=2 \
 --num_rnn_layers=3 \
 --rnn_layer_size=2048 \
diff --git a/deep_speech_2/test.py b/deep_speech_2/test.py
--- a/deep_speech_2/test.py
+++ b/deep_speech_2/test.py
@@ -17,8 +17,8 @@
 add_arg('batch_size',       int,    128,    "Minibatch size.")
 add_arg('trainer_count',    int,    8,      "# of Trainers (CPUs or GPUs).")
 add_arg('beam_size',        int,    500,    "Beam search width.")
-add_arg('num_proc_bsearch', int,    12,     "# of CPUs for beam search.")
-add_arg('num_proc_data',    int,    4,      "# of CPUs for data preprocessing.")
+add_arg('num_proc_bsearch', int,    8,      "# of CPUs for beam search.")
+add_arg('num_proc_data',    int,    8,      "# of CPUs for data preprocessing.")
 add_arg('num_conv_layers',  int,    2,      "# of convolution layers.")
 add_arg('num_rnn_layers',   int,    3,      "# of recurrent layers.")
 add_arg('rnn_layer_size',   int,    2048,   "# of recurrent cells per layer.")