!47897 Fix tutorial question and synchronize to r1.10

Merge pull request !47897 from 刘勇琪/r1.10
This commit is contained in:
i-robot 2023-01-16 10:57:51 +00:00 committed by Gitee
commit 0898600474
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -653,7 +653,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