v-iashin / VoxCeleb

An attempt to replicate the results of [1706.08612] VoxCeleb: a large-scale speaker identification dataset
12 stars 3 forks source link

error: module multiprocessing.util' has no attribute '_flush_std_streams #2

Closed hktxt closed 5 years ago

hktxt commented 5 years ago

hey~~~ I run your code but error shows up..... it seems like cannot enumerate trainloader. once do enumerate(trainloader), error appears: "module multiprocessing.util' has no attribute '_flush_std_streams" However, change the NUM_WORKERS to 1, it disappeared..., but that's not what I want...

`AttributeError Traceback (most recent call last) in 21 plt.title('Batch from dataloader') 22 ---> 23 for i_batch, sample_batched in enumerate(dataloader): 24 print(i_batch, sample_batched['image'].size(), 25 sample_batched['landmarks'].size())

~/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/data/dataloader.py in iter(self) 499 500 def iter(self): --> 501 return _DataLoaderIter(self) 502 503 def len(self):

~/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/data/dataloader.py in init(self, loader) 287 for w in self.workers: 288 w.daemon = True # ensure that the worker exits on process exit --> 289 w.start() 290 291 _update_worker_pids(id(self), tuple(w.pid for w in self.workers))

~/anaconda3/envs/pytorch/lib/python3.6/multiprocessing/process.py in start(self) 103 'daemonic processes are not allowed to have children' 104 _cleanup() --> 105 self._popen = self._Popen(self) 106 self._sentinel = self._popen.sentinel 107 # Avoid a refcycle if the target function holds an indirect

~/anaconda3/envs/pytorch/lib/python3.6/multiprocessing/context.py in _Popen(process_obj) 221 @staticmethod 222 def _Popen(process_obj): --> 223 return _default_context.get_context().Process._Popen(process_obj) 224 225 class DefaultContext(BaseContext):

~/anaconda3/envs/pytorch/lib/python3.6/multiprocessing/context.py in _Popen(process_obj) 275 def _Popen(process_obj): 276 from .popen_fork import Popen --> 277 return Popen(process_obj) 278 279 class SpawnProcess(process.BaseProcess):

~/anaconda3/envs/pytorch/lib/python3.6/multiprocessing/popen_fork.py in init(self, process_obj) 15 16 def init(self, process_obj): ---> 17 util._flush_std_streams() 18 self.returncode = None 19 self._launch(process_obj)

AttributeError: module 'multiprocessing.util' has no attribute '_flush_std_streams'`

I dont know how to solve it

hktxt commented 5 years ago

nevermind..... it working now