diff --git a/deep_speech_2/data_utils/data.py b/deep_speech_2/data_utils/data.py index fe064b8062d75364b49c7b84a4c5879d329c0296..34f32019c238b3c2082ffdc809527b7cf6c49d0a 100644 --- a/deep_speech_2/data_utils/data.py +++ b/deep_speech_2/data_utils/data.py @@ -65,7 +65,7 @@ class DataGenerator(object): max_freq=None, specgram_type='linear', use_dB_normalization=True, - num_threads=multiprocessing.cpu_count(), + num_threads=multiprocessing.cpu_count() // 2, random_seed=0): self._max_duration = max_duration self._min_duration = min_duration diff --git a/deep_speech_2/evaluate.py b/deep_speech_2/evaluate.py index fb7211fc2aaa8dfd086116e8fb29afe6c0087ce9..592b7b527a692dd7dfa2a93799828fb77066948c 100644 --- a/deep_speech_2/evaluate.py +++ b/deep_speech_2/evaluate.py @@ -45,12 +45,12 @@ parser.add_argument( help="Use gpu or not. (default: %(default)s)") parser.add_argument( "--num_threads_data", - default=multiprocessing.cpu_count(), + default=multiprocessing.cpu_count() // 2, type=int, help="Number of cpu threads for preprocessing data. (default: %(default)s)") parser.add_argument( "--num_processes_beam_search", - default=multiprocessing.cpu_count(), + default=multiprocessing.cpu_count() // 2, type=int, help="Number of cpu processes for beam search. (default: %(default)s)") parser.add_argument( diff --git a/deep_speech_2/infer.py b/deep_speech_2/infer.py index 8fd27dce4a1eafe7acd5fd4190833004339965c7..df5953e59fd198951babeabe3fa27ae680ef0ad6 100644 --- a/deep_speech_2/infer.py +++ b/deep_speech_2/infer.py @@ -45,7 +45,7 @@ parser.add_argument( help="Number of cpu threads for preprocessing data. (default: %(default)s)") parser.add_argument( "--num_processes_beam_search", - default=multiprocessing.cpu_count(), + default=multiprocessing.cpu_count() // 2, type=int, help="Number of cpu processes for beam search. (default: %(default)s)") parser.add_argument( diff --git a/deep_speech_2/train.py b/deep_speech_2/train.py index 080f57d2d4012f37719f021b6ae6156230dcd9e0..aff6193796e48a8f8db349d3865b064c9a4f5f56 100644 --- a/deep_speech_2/train.py +++ b/deep_speech_2/train.py @@ -86,7 +86,7 @@ parser.add_argument( help="Trainer number. (default: %(default)s)") parser.add_argument( "--num_threads_data", - default=multiprocessing.cpu_count(), + default=multiprocessing.cpu_count() // 2, type=int, help="Number of cpu threads for preprocessing data. (default: %(default)s)") parser.add_argument( diff --git a/deep_speech_2/tune.py b/deep_speech_2/tune.py index a17be30fa80892e924461ad6e5d6ca263429d9f4..328d67a1197634e5f02ad0689056196a8904fc06 100644 --- a/deep_speech_2/tune.py +++ b/deep_speech_2/tune.py @@ -51,7 +51,7 @@ parser.add_argument( help="Number of cpu threads for preprocessing data. (default: %(default)s)") parser.add_argument( "--num_processes_beam_search", - default=multiprocessing.cpu_count(), + default=multiprocessing.cpu_count() // 2, type=int, help="Number of cpu processes for beam search. (default: %(default)s)") parser.add_argument(