!45574 Fix tutorial question

Merge pull request !45574 from shenwei41/master
This commit is contained in:
i-robot 2022-11-17 06:44:40 +00:00 committed by Gitee
commit 04145279ef
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -656,7 +656,7 @@ class GeneratorDataset(MappableDataset, UnionBaseDataset):
" to replace it with python implemented operator like numpy etc. Here decrease 'num_parallel_workers' "
"into 1.")
if python_multiprocessing and platform.system().lower() == 'windows':
if platform.system().lower() == 'windows' and num_parallel_workers > 1 and python_multiprocessing:
logger.warning("Python multiprocessing is not supported on Windows platform.")
self.python_multiprocessing = python_multiprocessing if platform.system().lower() != 'windows' else False