diff --git a/deep_speech_2/data_utils/utility.py b/deep_speech_2/data_utils/utility.py index 40e212c89c3977890d7dc87c5076e3b7f62bc380..123348cbc3b4ca50d58e309598f4539a39c072af 100644 --- a/deep_speech_2/data_utils/utility.py +++ b/deep_speech_2/data_utils/utility.py @@ -133,6 +133,7 @@ def xmap_readers_mp(mapper, reader, process_num, buffer_size, order=False): # start a read worker in a process target = order_read_worker if order else read_worker p = Process(target=target, args=(reader, in_queue)) + p.daemon = True p.start() # start handle_workers with multiple processes @@ -143,6 +144,7 @@ def xmap_readers_mp(mapper, reader, process_num, buffer_size, order=False): Process(target=target, args=args) for _ in xrange(process_num) ] for w in workers: + w.daemon = True w.start() # get results diff --git a/deep_speech_2/examples/aishell/run_train.sh b/deep_speech_2/examples/aishell/run_train.sh index 8e61ec3c2ad80291f7d45391f6c01c8c62a126c8..afb7d2efb2b41b6f50d95049edc0d234eadf4de1 100644 --- a/deep_speech_2/examples/aishell/run_train.sh +++ b/deep_speech_2/examples/aishell/run_train.sh @@ -9,7 +9,7 @@ python -u train.py \ --batch_size=64 \ --trainer_count=8 \ --num_passes=50 \ ---num_proc_data=12 \ +--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_train.sh b/deep_speech_2/examples/librispeech/run_train.sh index 69251fe0c53c33bf8f48d2516328e74cd00e3852..073619c2ab2307c07a29e7220fca2d38ecd37120 100644 --- a/deep_speech_2/examples/librispeech/run_train.sh +++ b/deep_speech_2/examples/librispeech/run_train.sh @@ -9,7 +9,7 @@ python -u train.py \ --batch_size=512 \ --trainer_count=8 \ --num_passes=50 \ ---num_proc_data=12 \ +--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 index 40f0795a1308d4df9287a32abb5018b099aa5935..51c725c5f76fd6b1e59d042988546b0b6934e43b 100644 --- a/deep_speech_2/test.py +++ b/deep_speech_2/test.py @@ -18,7 +18,7 @@ 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, 12, "# of CPUs for data preprocessing.") +add_arg('num_proc_data', int, 4, "# 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.") diff --git a/deep_speech_2/train.py b/deep_speech_2/train.py index 44b2ccbc46c87966461001d4a1086e0f16bbc48a..017cc73f64aaac82f176c54fb6063b6afa22e829 100644 --- a/deep_speech_2/train.py +++ b/deep_speech_2/train.py @@ -16,7 +16,7 @@ add_arg = functools.partial(add_arguments, argparser=parser) 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, 12, "# of CPUs for data preprocessing.") +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.")